C# 两个实体集合比较获取差异值

两个实体集合比较获取差异值

PLST.Where(x => !plst.Select(y => y.ERPSalesType).Contains(x.ERPSalesType)).Union(plst.Where(x => !PLST.Select(y => y.ERPSalesType).Contains(x.ERPSalesType)));

//将差异值和数据库现有数据比较取交集,获取要删除的数据
var deleteList = PLST.Intersect(deleteAndAddList).ToList();

posted @ 2019-05-23 09:04  E山猫  阅读(2919)  评论(0编辑  收藏  举报