一条linq

var entres = from entry in db.Entries group entry by entry.Name into groupByName orderby groupByName.Count() descending select new CommentSummary { NumberOfComments = groupByName.Count(), UserName = groupByName.Key };
posted @ 2017-03-05 00:00  PhilXu  阅读(70)  评论(0编辑  收藏  举报