我有一个启用了 oData 的经典 REST Web api 控制器,它具有类似的 Get 功能
[EnableQuery()]
public IQueryable<StoreCommand> Get()
{
return _storeCommandService.GetAllStoreCommands().AsQueryable();
}
我需要了解如何拨打电话以仅使用某些 url 获取记录数
我试过了
http://localhost:9910/api/storeCommandsrest?$count
但我明白了
消息:“不支持查询参数 '$count'。”
请注意,我使用的是返回 IQueryable 集合的 MongoDb。