当前位置: 代码迷 >> PB >> ef not in跟 GroupBy 分组
  详细解决方案

ef not in跟 GroupBy 分组

热度:488   发布时间:2016-04-29 05:20:51.0
ef not in和 GroupBy 分组
ef 分组 排序 之后取第一行 List<InstrStateDetail> listGroupPost = this.Select().GroupBy(i => i.InstrCode).Select(i => i.OrderByDescending(j => j.OccurDateTime).FirstOrDefault()).ToList();ef 分组 排序 之后取所有数据List<InstrStateDetail> listGroupPost = this.Select().GroupBy(i => i.InstrCode).SelectMany(i => i.OrderByDescending(j => j.OccurDateTime)).ToList();not in linqList<InstrStateDetail> breakInstr = bllInstrStateDetail.GetBreakState();var xx=(from c in measStateDetail where !((from d in breakInstr select d.InstrCode).Contains(c.InstrCode)) select c).ToList()not in eflistSP= query1.Where(m => !query2.Contains(m.ETPRS_CODE)).ToList();