Search code examples
c#asp.net-web-apiodataasp.net-web-api-odata

Not able to use oData query options


I have an ASP.NET Web API project. I'm trying to pass some query options to my API controller like so:

http://localhost:61736/api/Enquiries?
callback=callback&$top=30&$skip=30&orderby=EnquiryId
&$inlinecount=allpages&_=1346164698393

But I get the following:

The query parameter '$inlinecount' is not supported.

I also get the same when I try to use $callback, $format

Any idea what I'm doing wrong? According to: http://msdn.microsoft.com/en-us/library/ff478141.aspx I should be able to use them?


Solution

  • The ASP.NET Web API provides only limited support for OData as documented in this blog post. I didn't see the query parameters you mention in that list.