I am creating a WebAPI that retrieves its data from legacy systems, so there is no Entity Framework for me. Now I want to use OData functionality, but I wonβt work if I have something like Entity Framework. But in my research, I found out that I can get ODataQueryOptions like this.
public IQueryable<Vehicle> Get(ODataQueryOptions opts) { var dal = new DataAccessVehicles(); return (dal.GetVehicles(opts)); }
In my DAL, I could translate the OData query into a real SQL query. But that seems like a lot of work.
My question is is there any other way or better way to achieve this without using the Entity Framework. Any advice / help would be appreciated.
source share