我正在努力通过来自 HTTP 客户端的基于 OData 的 REST 服务调用来调用 Azure 存储表。
正常查询效果很好,但是当我使用 $count、$inlinecount、$orderBy 查询时,出现以下异常。
The ability of the data service to return row count information is disabled. To enable this functionality, set the DataServiceConfiguration.AcceptCountRequests property to true.
和
The requested operation is not implemented on the specified resource.
我很困惑在哪里启用此功能,有人可以帮忙吗?
最佳答案
I am confused where to enabled this functionality.
简单的答案是你不能。
Azure Tables 对 OData 查询选项的支持有限,仅支持 $filter
、$select
和 $top
查询选项。
您可以在这里阅读更多相关信息:https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-query-options 。
关于Azure 表存储 REST OData 不支持 $count 和 $orderby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51246190/