如何使用LINQ查询更新列表视图(sharepoint 2007):
SPList taskList = SPContext.Current.Web.Lists["List1"];
SPList branchList = SPContext.Current.Web.Lists["List2"];
var taskListItems = from SPListItem tItem in taskList.Items
join SPListItem IItem in branchList.Items on tItem["Branch"].ToString().Split(new string[]{";#"},StringSplitOptions.None)[1] equals IItem.Title.ToString()
where IItem.Title.ToString() == "Kazan"
select tItem.Title;
答案 0 :(得分:0)
SharePoint 2007不支持Linq(.net 3.5)开箱即用,我猜您使用的是模板吗?
您需要按照指南进行设置:
然后,本指南可能会帮助您构建查询