var result = db.Work_Process .JoinTable<Base_Station>((a, b) => a.StationNo == b.StationNo, JoinType.Left) .GroupBy(a => new { a.StationNo, b.SortIndex }) .OrderBy(g => g.Key.SortIndex) .Select(g => new { StationNo = g.Key.StationNo, Count = g.Count() }) .ToList();

将 LINQ 语句转换为 SqlSugar 表达式 -  高效查询数据库

原文地址: http://www.cveoy.top/t/topic/f2Rj 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录