Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I retrieve all items from SharePoint 2010 list and store in a datatable using LINQ query?
SPList yourlist = yourweb.Lists["YourListName"]; SPListItemCollection 项目 = yourList.Items;
以上将为您提供所有项目作为一个集合,然后您只需要迭代并插入到您的数据库中。正如 Rawling 所说,你真的不需要 linq 查询。
问候,KS