I’m playing around with the WebAPI beta, and it seems that selects have no effect on the response of an action returning an IQueryable.
Eg:
http://localhost:62689/api/product?$select=Id,Name
Expected:
<Product>
<Id>1</Id>
<Name>Product 1</Name>
</Product>
Actual result:
<Product>
<Id>1</Id>
<Name>Product 1</Name>
<ItemsInStock>6</ItemsInStock>
<Price>49.99</Price>
<Created>2012-01-15T00:00:00</Created>
</Product>
Are there limitations on OData support for WebAPI?
I’ve tried other queries on this set of data (like top, filter) and they work fine.
The Web API does not support the OData $select query.
Take a look at this forum post for more details.