我正在閱讀使用Odata RESTful服務的Sharepoint列表數據(> 20000個條目),詳情請參閱此處的-http://blogs.msdn.com/b/ericwhite/archive/2010/12/09/ odata-rest-api-to-query-a-sharepoint-list.aspxOData服務未返回完整回覆
我能夠讀取數據,但我只能得到前1000條記錄。我還檢查了Sharepoint服務器上的List View Throttling設置爲5000。好心提醒。
更新:
@Turker:你的答案是當場上!非常感謝你。我能夠在第一次迭代中獲得第一批2000條記錄。但是,我在while循環的每次迭代中都得到相同的記錄。我的代碼如下 -
...initial code...
int skipCount =0;
while (((QueryOperationResponse)query).GetContinuation() != null)
{
//query for the next partial set of customers
query = dc.Execute<CATrackingItem>(
((QueryOperationResponse)query).GetContinuation().NextLinkUri
);
//Add the next set of customers to the full list
caList.AddRange(query.ToList());
var results = from d in caList.Skip(skipCount)
select new
{
Actionable = Actionable,
}; Created = d.Created,
foreach (var res in results)
{
structListColumns.Actionable = res.Actionable;
structListColumns.Created= res.Created;
}
skipCount = caList.Count;
}//Close of while loop