6

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.

1 Answer 1

5

The Web API does not support the OData $select query.

The current support of query string parameters is limited to $top, $skip, $filter and $orderby.

Take a look at this forum post for more details.

Sign up to request clarification or add additional context in comments.

1 Comment

As of version 5.0 $select and $expand are now supported. aspnetwebstack.codeplex.com/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.