Lambda表达式 实现两个集合数据筛选

查找enwlist中与Fristenwlist不同的数据

var exp2 = enwlist.Where(a => !Fristenwlist.Where(t => a.PARAM_ID==t.PARAM_ID).Any()).ToList();


查找enwlist中与Fristenwlist相同的数据

var exp1 = Fristenwlist.Where(a => enwlist.Exists(t => a.PARAM_ID.Equals(t.PARAM_ID))).ToList();

猜你喜欢

转载自blog.csdn.net/ITX2000/article/details/79751912