标签:
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 linq List<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 ef listSP= query1.Where(m => !query2.Contains(m.ETPRS_CODE)).ToList();
标签:
原文地址:http://blog.csdn.net/zhishiheng/article/details/42975805