I've got an ASP.NET WebAPI OData service. One of the EntitySetController<,>.Get() methods returns an entity framework query. Since the entity framework query returns a lot of rows, I want to use server-side paging to keep the memory footprint reasonable. Also, $skiptoken is much faster than $skip in this case.
The [Queryable(PageSize = n)] attribute does not seem to accomplish exactly what I need for two reasons:
- They actual SQL query isn't paged. It's like it's doing .AsEnumerable().Take(n)
- The "next link" uses $skip instead of $skiptoken
Is there any way to accomplish what I'm trying to do?