This project is read-only.

OData support?

Topics: ASP.NET Web API
Jun 12, 2012 at 12:27 AM

Changeset 'af11adf6b3c5by' last week mentions "we plan to provide much better OData support as a separate feature based on the OData library."

Could someone elaborate?

Jun 12, 2012 at 5:32 AM

+1 for elaboration

Jun 12, 2012 at 6:59 PM

Digging through the code, is there any OData filtering support or has it all been removed for RC?

Jun 12, 2012 at 9:01 PM

Also wondering what's happening here. Is OData support going to make it to RTM? You didn't listen to the trolls did you? OData URI convention support is such a wicked feature, would be a shame to delay it.

Jun 13, 2012 at 6:53 PM

Sure. ASP.NET Web API today only has very limited OData support. We only support four OData query operators: $top, $skip, $orderby and $filter.

We are working on much richer OData support for ASP.NET Web API including an OData formatter, an EDM model builder, richer query support, $metadata support and link generation support. The idea is to compliment the OData support in WCF Data Services by providing better support for data sources that may not provide full OData query semantics and also by enabling more flexible support for custom business logic.

We are working in close collaboration with the Microsoft OData team that builds the ODataLib NuGet package and the ASP.NET Web API OData support will be based on ODataLib. We hope to be able to check-in an initial preview of the new OData support to the CodePlex repository in the next month or two.

Hope this helps.

Jun 19, 2012 at 5:09 PM

Hi all,

I don't know if its intentional but the OData implementation ignores invalid or unsupported query options such as $iflter (typo is intended). The OData specification reads as follows:

OData services SHOULD NOT require any query options to be specified in a request, and SHOULD fail any request that contains query options that it does not understand.

I guess a moot point here is the possibility of breaking existing working code, that actually shouldn't be working, if you decide to comply with the standard. At the moment, the filter will be ignored and more results will be returned than the developer anticipates.

Thanks and keep up the good work,


Jun 27, 2012 at 3:03 AM


I think that statement should be interpreted like this:

... SHOULD fail any request that contains [system] query options that it does not understand.

The distinction is important because clearly $iflter is not defined in OData at the moment, so is NOT a system query option.
Which means the OData implementation behavior is as intended. 


Aug 31, 2012 at 9:35 AM

It's the last day of August. Any news/updates on the "issue"  ?


Aug 31, 2012 at 2:53 PM

Marty, Are you asking for where we are with OData support? We have released a preview of the much improved support. You can find an overview of the new feature here [1] and a detailed description here [2] and here [3]. You can get the latest nightly nuget package for trying it out, see [4].

Hope this helps,