Description
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.