C# linq groupby sum

var records = studyRecords.GroupBy(x => x.StudyTime.Date).Select(y => new
            {
                date = y.Key,
                seconds = y.Sum(x => x.StudySeconds)
            });

 

阿里云优惠活动

posted @ 2020-11-14 15:10  向萧  阅读(2524)  评论(0编辑  收藏  举报