You can use the Microsoft OData implementation without the Entity Framework. You need an implementation of IQueryable . Here is an example of an OData service requesting an array of objects:
using System.Web.Http; using System.Web.Http.OData; using System.Web.Http.OData.Builder; using System.Web.Http.OData.Query; // GET api/values [ActionName("FromList")] public IList<Poco> GetFromList(ODataQueryOptions<Poco> queryOptions) { IQueryable<Poco> data = ( new Poco[] { new Poco() { id = 1, name = "one", type = "a" }, new Poco() { id = 2, name = "two", type = "b" }, new Poco() { id = 3, name = "three", type = "c" } }) .AsQueryable(); var t = new ODataValidationSettings() { MaxTop = 25 }; queryOptions.Validate(t); var s = new ODataQuerySettings() { PageSize = 25 }; IEnumerable<Poco> results = (IEnumerable<Poco>)queryOptions.ApplyTo(data, s); return results.ToList(); } public class Poco { public int id { get; set; } public string name { get; set; } public string type { get; set; } }
qujck source share