I'm building a WebAPI that is getting its data from legacy systems so no Entity Framework available for me. Now I want to use OData functionality but is not going to work if I have somethink like Entity Framework. But in my research I found out that I can fetch the 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 to an actual SQL query. But this does seem like a lot of work.
My question is, is there another way or a better way to achieve this without using Entity Framework. Any tips/help would be appreciated.