C# ling to sql 取多条记录最大时间

     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();

 

你可能感兴趣的:(C# ling to sql 取多条记录最大时间)