This project is read-only.

Paging with OData and Excel

Topics: ASP.NET Web API
Nov 17, 2013 at 9:48 PM

I'm using OData to send data to Excel. My Get-Function in my control:
Public Function Get As EdmEntityObjectCollection

I create a dynamic edm and all is ok, when I have only less data. Without top xxxx , I get an timeout.
How can I set the controller to transfer allways only perhaps 100 rows and with the next request, the next 100?
The top in queryOptions is at the moment allways empty.

Best regards
Nov 18, 2013 at 10:45 PM
you have to do server driven paging i.e send only 100 results in a response and set the next page link in the response to point to the next 100 result set.

you can set the next page link on the response using the extension method SetNextPageLink on HttpRequestMessage.
Marked as answer by chmav on 11/19/2013 at 1:53 PM
Nov 19, 2013 at 9:53 PM

Thanks for the fast answer. It's running.