c# - OData EnableQuery is not working in production -


i have odata function return collection of entity set(user) below

[httpget, odataroute("gettopusers(userid={userid})")] [enablequery(allowedqueryoptions = allowedqueryoptions.top)] public ihttpactionresult gettopusers(int? userid) {     ilist<user> users = new list<user>()     {         new user() { id=1, name ="first" },         new user() { id=2, name ="second" },         new user() { id=2, name ="third" }     };     return ok(users); } 

but when invoked function

productionurl/gettopusers(userid={userid})?$top=1

it return users meaning not applying top query same working in development environment.

am missed anything? idea helpful.

i updated packages of

microsoft.aspnet.odata => 5.9.1

microsoft.aspnet.webapi.odata => 5.7.0


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -