Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 22, 2012 10:38 AM by Ravi theja
0 Points
1 Post
Feb 24, 2012 06:14 PM|LINK
I am exposing an entity model using ASP.NET MVC 4. I have created a controller that is based on ApiController and I have a method:
public IQueryable<ClaimHeader> GetClaimHeader() { return CreateDataContext().ClaimHeaders; }
When I call the method from the URL of my browser like:
localhost/MRABusinessClaimWeb/api/Query/ClaimHeader?$filter=Neg eq 'LAM'
It works and results are returned.
However, I want to use the SELECT functionality of the ODATA protocol so I tried:
localhost/MRABusinessClaimWeb/api/Query/ClaimHeader?$filter=Neg eq 'LAM'&$select=Neg
This returns the entire record and does not limit the result set just to the "Neg" field. Is this expected behavior or a bug?
Luke
Member
30 Points
12 Posts
Feb 24, 2012 06:20 PM|LINK
$select is not supported and there doesn't appear to be plans to support $select
See here: http://forums.asp.net/t/1771116.aspx/1?OData+Support
20 Posts
Mar 22, 2012 10:38 AM|LINK
Hi
What about count?
lukemauldin
0 Points
1 Post
WebAPI and IQueryable
Feb 24, 2012 06:14 PM|LINK
I am exposing an entity model using ASP.NET MVC 4. I have created a controller that is based on ApiController and I have a method:
public IQueryable<ClaimHeader> GetClaimHeader() { return CreateDataContext().ClaimHeaders; }When I call the method from the URL of my browser like:
It works and results are returned.
However, I want to use the SELECT functionality of the ODATA protocol so I tried:
This returns the entire record and does not limit the result set just to the "Neg" field. Is this expected behavior or a bug?
Luke
thechoyce
Member
30 Points
12 Posts
Re: WebAPI and IQueryable
Feb 24, 2012 06:20 PM|LINK
$select is not supported and there doesn't appear to be plans to support $select
See here: http://forums.asp.net/t/1771116.aspx/1?OData+Support
http://www.bridgeworkers.co
Ravi theja
Member
30 Points
20 Posts
Re: WebAPI and IQueryable
Mar 22, 2012 10:38 AM|LINK
Hi
What about count?