Expose OData filter syntax information to controller actions
The Odata filter syntax can be applied to IQueryable collections returned by actions. This works fine if one returns a linq query from EF, where the filtering will be applied when the data is pulled from the database. In some cases entities may be composites, or a repository pattern may be used, or the data is being pulled from another source not supported by EF (for example, may be from an azure store). In these cases intervening logic may need to do more complex actions in order to support efficient filtering. The only alternative without exposing the OData filtering information to the controller action is to instead implement an alternative filtering mechanism for those cases (for example, with additional parameters into the Get action). It'd be better if we could have a consistent syntax for all cases we expose to clients, and deal with how it is implemented in the controller layer.
With the new ASP.NET Web API OData support you can now add an ODataQueryOptions parameter to your Web API actions, which contains the parsed OData query and then handle it however you’d like. See http://blogs.msdn.com/b/alexj/archive/2012/08/21/web-api-queryable-current-support-and-tentative-roadmap.aspx for details.