CamlQuery camlQuery = new CamlQuery();camlQuery.ViewXml = @"<View Scope='RecursiveAll'> <Query> </Query> </View>";camlQuery.FolderServerRelativeUrl = folder.ServerRelativeUrl;ListItemCollection listItems = list.GetItems(camlQuery);clientContext.Load(listItems);clientContext.ExecuteQuery(); listItems正在獲取我要使用filename過(guò)濾列表的所有4個(gè)文件。如果filename與數(shù)據(jù)庫(kù)表文件名匹配,則將該項(xiàng)目從listItems中排除例如 -4 files - 1.txt 2.txt 3.txt 4.txtin `database` table if `1.txt and 2.txt` is present then it will match with listItems filename and need to exclude these two items from listItems.上面只是一個(gè)示例,我有100個(gè)文件,我需要使用文件名進(jìn)行比較,如果存在數(shù)據(jù)庫(kù)表中,則需要從列表中排除。So we listItems is having only 2 items - 3.txt 4.txt我如何在沒(méi)有foreach循環(huán)的情況下實(shí)現(xiàn)這一目標(biāo)?有什么可以使用的,例如LINQ或CamlQuery嗎?
如何篩選ListItemCollection共享點(diǎn)對(duì)象模型
慕碼人8056858
2021-05-18 17:14:47