This project is read-only.

Adapting queryoption value

Topics: ASP.NET Web API
Apr 15, 2013 at 2:23 PM
Edited Apr 15, 2013 at 2:26 PM
I created an Action that returns a list using a custom order (yes, a stable order).
I then created an Action that, in addition to the above, skips to a certain entry.

I'm however also using [Queryable(PageSize=50, EnsureStableOrdering=false)] on this action for pagination and the other OData queries.
The problem is this causes the odata.nextLink value to be $skip=50, whereas the skip I manually applied could be 10000, for instance. That value should be added to the $skip value ($skip=10050).

I tried to use Request.SetNextPageLink() but that was overriden with the default and I looked at the QueryOptions property in the controller but those values are read only.

I guess I could override the "ApplyQuery" function in the QueryableAttribute to adapt the handling of $skip but since just changing the value is such a minor change, I thought that it'd be possible in a different manner.

Thanks in advance for any help to getting the paging to match with the custom skipping.
Also, if there is a much cleaner way of creating a pre-skipped list where $skip is set correctly automatically, please tell me.