OData totalCount

Topics: Web Api
Sep 20, 2011 at 6:03 PM

I'm consuming an OData feed thats is generated much like the QueryableSample from WCF Web API Preview 4.

Looks like $inlinecount=allpages do not work to return the totalcount, there is an alternative way to do it? I sure can make another request to get the count or simply create a Count property on my class (but in this case it would get repeated in every item) but I prefer a more elegant way if possible. It is?

Maybe a way to intercept the collection after the OData operators are proccessed, encapsulate it on a custom object with the totalCount property?


Dec 19, 2011 at 5:27 AM

Web Preview 6 - has $inlinecount been implemented yet? I get this error:

Invalid query operator 'inlinecount'.Parameter name: queryOperator