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

 

posted @ 2019-09-30 09:14  低调码农哥!  阅读(598)  评论(0编辑  收藏  举报