Search code examples
asp.net-web-apiodataasp.net-web-api-odataodata-v4

OData query option $count in $expand not working


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?


Solution

  • This feature hasn't been implemented yet. A related issue has been created https://github.com/OData/WebApi/issues/165 .