集合去重筛选

//去重筛选三个属性去重筛选
 var ChgDtlVoList = datas.Where((x, i) => datas.FindIndex(z => z.ChgId == x.ChgId && z.OdStd == x.OdStd && z.BatNo == x.BatNo) == i).ToList();

单个筛选

//去重筛选
var ChgDtlVoList = datas.Where((x, i) => datas.FindIndex(z => z.ChgId == x.ChgId ) == i).ToList()

 

posted @ 2021-03-13 17:43  博客YS  阅读(83)  评论(0编辑  收藏  举报