Continuation Support
We are executing a query against an OData source that has pagination enabled for 200 rows. This means it uses the OData skiptoken mechanism to page through the resultset.
LinqPad seems to only support returning the first page of results. Is there anyway to make LinqPad return the full resultset up to the configured row limit?
Thanks
Joe
LinqPad seems to only support returning the first page of results. Is there anyway to make LinqPad return the full resultset up to the configured row limit?
Thanks
Joe
Comments
- It works only in results-to-text mode (not data grids)
- You must select the the entire row (not into an anonymous type)
I am using a connection to a SharePoint 2010 ListData.svc OData service. The first returns 1325, the second returns only the first 1000 (pagination stops it) as does the third.
Documents.Where (d => d.GroupId < 1000).Count()
Documents.Where (d => d.GroupId < 1000).ToList().Count()
Util.WriteCsv(Documents.Where (d => d.GroupId < 1000), @"c:\docs.csv");
I understand the first one really invokes the $count parameter on the URL - I just included it to demonstrate the discrepancy. I can see from the request that the last item in the returned XML is the tag indicating there is additional data:
<link rel="next" href="http://server/_vti_bin/ListData.svc/Documents?$filter=GroupId%20lt%201000&$skiptoken=1007" />
LINQPad is configured to evaluate the script in "C# Expression" mode.
Anyway - this was doubly cool as it opened a new query window with the Execute<>(uri) method already populated with the same URI and included the skip token. This opens up some other avenues for testing as I often have LINQPad generate a URI that I then use in JavaScript when talking to the OData service.
Double prizes. Today is a great day!
"You must select the the entire row (not into an anonymous type) "
When do you plan to support Anonymous type for oData queries?