I wrote an OData service to handle skip and top options (also inside expand) in my own code. The following code works for entities but does not work for skip and top inside expand clause.
var ignoreQueryOptions = AllowedQueryOptions.Skip | AllowedQueryOptions.Top;
return queryOptions.ApplyTo(queryable, ignoreQueryOptions);
The above code disable skip and top for a request such as below:
https://api.parliament.uk/odata/FormalBody?$top=2&$skip=1
But the code could not disable skip and top for a request such as below:
https://api.parliament.uk/odata/Member('0FqjjgNp')?$expand=MemberHasParliamentaryIncumbency($orderby=ParliamentaryIncumbencyStartDate;$skip=1)
I would like to disable skip and top inside expand for all navigation properties, i.e., without need to specify the navigation properties explicitly.
@johnhzhu I understand the issue that you are running into but for the sake of completeness, can you please add the query with skip and top inside the expand clause to the issue?
Do you want to disable skip and top for this route only?
The title of your issue seems to be different from what you are describing. Can you please add more detail about applying it twice.
@johnhzhu I understand the issue that you are running into but for the sake of completeness, can you please add the query with skip and top inside the expand clause to the issue?
Do you want to disable skip and top for this route only?
The title of your issue seems to be different from what you are describing. Can you please add more detail about applying it twice.
Sorry for lack of details. I changed the post above.
Hello!
Are there any updates in regards with this issue/feature?
Hello,
I have the same problem with the $select. The ignoreQueryOptions are applied to the root object, but not to the expanded objects. I would like to disable $select, $top, and $skip for the root object and all expanded navigation properties.
Are there any updates already?
Most helpful comment
Hello!
Are there any updates in regards with this issue/feature?