这个问题与这个问题非常相似: Use LINQ to get items in a List<>, that are not in another List<>。但是这些差异足以让我无法确定 LINQ 语法。
我有两个清单:
List<Fubar> fewBarNew
List<string> existingProviderIDs
哪里Fubar看起来像:
Class Fubar
{
int FunbarId int {get; set;}
....
....
string ProviderID {get; set;}
}
现在,我想从内部存在的fewBarNew任何实例中删除.FewBarNew.ProviderIDexistingProviderIDs
fewBarNew = fewBarNew.Where(f => !existingProviderIdList.Any(ep => ?????).ToList();
MM们
相关分类