C# ling to sql 取多条记录最大时间
程序员文章站
2022-11-18 13:56:39
var _setList = (from f in _postgreDbContext.settlements group f by ( new { f.settlement_code })into g select new { deal_time = g.Max(m => m.deal_time)... ......
var _setlist = (from f in _postgredbcontext.settlements group f by ( new { f.settlement_code })into g select new { deal_time = g.max(m => m.deal_time), g.key.settlement_code }).asnotracking().tolist();