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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -