I am looking for a sample Odata application by using WebApi, but without using EF. My requirement is to implement a couple of action methods inside a controller (derived from ODataController) that return complex objects that can be queried. These action methods should also be able to take multiple parameters. The data returned is being pulled from multiple data sources, so using entity framework is not an option. I would like to implement a method like this:
public List RetrieveCustomersByFilter(string name, string lastName, CustomerTypeEnum) { ...business logic goes here ... }
I have done a lot of research online, but I am still not able to find a concrete example. Most of them show simple methods that don't accept any parameters (or an id/key) and return a List of standard objects.
Can anyone provide a sample or point me to a link that shows how to go about this?
Thanks
check this out has the latest Web API 2 with ODATA sample with all steps ODATA v4 sample with asp.net web api 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With