Is it possible to disable the OData support?
I dont want this automatism because the filtering should be done at database level and I want do it on my own.
in ASP.NET Web API RC and onwards, you need to decorate your action with [Queryable] attribute to provide OData support. If you don't do that, then it simply won't be enabled.
UPDATE: According to this commit - http://aspnetwebstack.codeplex.com/SourceControl/changeset/changes/af11adf6b3c5 from June 7, QueryableAttribute is removed altogether in the latest build of Web API
The info says: we plan to provide much better OData support as a separate feature based on the OData library.
More info here: http://aspnetwebstack.codeplex.com/discussions/359229
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.
So just don't return IQuerable from your actions.
ToList() or ToArray() on it, and return that.