我正在尝试将 $orderBy 和 $top 运算符添加到我的 Apply 函数以返回前 5 个计数,但出现意外错误。这就是我读到它应该被格式化的方式。
https://localhost:5001/v2.0/TableName?$apply=groupby((Column1),aggregate($count as Count))&$orderby=Count desc&$top=5
我得到错误: "Message": "The query specified in the URI is not valid. Could not find a property named 'Count' on type '.....Models.TableName'."
任何指导将不胜感激。
像这样将它移动到括号内:
https://localhost:5001/v2.0/TableName?$apply=groupby((Column1),aggregate($count as Count)&$orderby=Count desc&$top=5)
我得到错误:
"Message": "The query specified in the URI is not valid. Invalid value '5)' for $top query option found. The $top query option requires a non-negative integer value.",