In this post, I explain the difference between the client.svc and the listdata.svc both services provided by SharePoint.
In this article I mention the fact that the ADO.NET Data Services can retreive only 1000 items at a time and somebody asked me some informations about this limitation.
Well after some investigations I have found out that it comes from the configuration of the listdata.svc on the SharePoint. Here is what I did.
I digged into the SharePoint body and I found that the assembly which runs underneath the listdata.svc is the Microsoft.SharePoint.Linq.DataService.dll (This dll can be found in the Global Assembly Cache). Then I use my friend Reflector to open up the dll and check what’s going on in there
and … I found an interesting line.
It means that the maximum results returns by page will be 3e8 = 1000
Ok we can retreive only 1000 items by page but we can go through the “pages” to get all the items.
For this we will use the DataServiceQueryContinuation which will be used as token that we will pass to the query to get the next results page.
If you have any question on the code, please feel free to comment this article.