Author: .NET Web Development and Tools Blog | Posted on: 2/6/2013 7:21:24 PM | Views : 1175

In the previous blog post , you can see how easy it is to enable OData query syntax for a particular action using Web API OData. Simply add a Queryable attribute to your action as follows, you are done. 1: [Queryable] 2: public IQueryable<WorkItem> Get( int projectId) It not only works for those actions using OData format, but also applies to any vanilla web api actions using other formats such as JSON.NET. It greatly reduces the need to write a lot of actions to perform operations like top, skip, orderby as well as filter. It is so powerful that it is almost hard to imagine building a real Web API application without it. Now everything works beautifully, why validation? As great as this may sound, adding Queryable to your action could...(read more) ...

Go to the complete details ...