asp.net web api - OData & .NET Web API -
i'm new odata , have question using in .net web api. in web api if have controller following method:
[enablequery()] public iqueryable<product> get() { var productrepository = new productrepository(); return productrepository.retrieve().asqueryable(); }
is necessary me retrieve products before odata query options applied or there way me retrieve products using odata query options?
i wouldn't want have retrieve products on 100,000 , have odata query options applied return 10 records based off of criteria.
thanks question.
because returning collection iqueryable, haven't got of data, filters applied you. here nice explanation of how iqueryable works entity framework. odata web api converting odata urls linq statements executed @ database level.
Comments
Post a Comment