var dataArray=db.Section_Textual.AsNoTracking().Where(p=> idList.Contains(p.ID))
.GroupBy(p =>new { p.SectionInfoId } )
.Select(p=>new { SectionInfoId=p.Key.SectionInfoId,count=p.Sum(s=>s.ID) })
ef groupby 多个字段 count
最新推荐文章于 2024-06-19 23:26:41 发布