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?
The EnableQuerySupport method enables query options globally for any controller action that returns an IQueryable type. If you don't want query options enabled for the entire application, you can enable them for specific controller actions by adding the [Queryable] attribute to the action method.
A query option is a set of query string parameters applied to a resource that can help control the amount of data being returned for the resource in the URL.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With