问题
I tried to use $count in an $expand like this query
.../OData/Foo(1)?$expand=Bars($count=true)
However count is no where to be found in the result.
{
"...": "...",
"Bars": {
"...": "..."
}
}
No error either. I'm using ASP.NET Web API OData 5.4, which is using OData v4.
What gives? Not implemented yet?
回答1:
This feature hasn't been implemented yet. A related issue has been created https://github.com/OData/WebApi/issues/165 .
来源:https://stackoverflow.com/questions/28967908/odata-query-option-count-in-expand-not-working