This project is read-only.

OData Functions

Topics: ASP.NET Web API
May 24, 2013 at 5:46 PM
Is there a roadmap for when odata functions will be supported in web api? I currently have the need to do the following...

GET api/Orders/Latest

This would call into an action on my controller called Latest() which return a filtered down collection of a users current orders. I am new to odata, but from what I read this would be an odata function--unlike an action which is similar but only works with a POST.

Also, are there any recommendations to handle this scenario today without function support?

Jun 11, 2013 at 11:42 AM
I'd like some more information on this subject as well as using actions for get-related data is a bit odd, not to mention quite annoying to implement with some libraries since actions utilize POST instead of GET.
Jun 11, 2013 at 3:50 PM
Support for functions is on our backlog, but we don't have any timeframe to share yet.

If you think this is something you would like to contribute to the project please do let us know.

Daniel Roth
Oct 7, 2013 at 4:45 PM
I am sorry if this sounds a bit harsh but - Why is it still in your backlog? It is currently the highest voted item, with 17 votes, on codeplex...

If odata function capability can be emulated using odata actions (but with POSTs), how difficult is it for you to implement the same functionality using GETs? Using a POST for immutable operations is semantically wrong and provides confusing meaning to an API. It also makes debugging significantly harder since I just can't hit the url in a browser and have to use a tool like fiddler to hit the API.

I really don't understand this, "let's involve the community and allow people to vote", but then ignore their participation mentality.
Oct 7, 2013 at 5:05 PM
We are just now wrapping up the ASP.NET Web API 2 release which includes a variety of new OData features - $select, $expand, $batch, $value, formatter extensibility, type-less support, and reusing an existing EDM. We are planning on shipping support for functions in our next release or ASP.NET Web API OData, which we plan to preview early next year along with support for OData v4.0.

Daniel Roth
Nov 18, 2013 at 9:56 PM
I've found this posting with description about type-less support.

Does someone has more examples? My problem is creating relations between two edmObjects from PK to FK.