基本上,我有一个类似的声明
Contents
.Where(x=>x.CategoryId==5 && x.Status==1)
.GroupBy(q=>q.VersionId)
.OrderByDescending(q=>q.Key)
.Take(100)
.Select(q => new { VersionId = q.Key, MajorVersion = q.Max(x => x.MajorVersion) })
目前,它看起来像下面。但我想将 MajorVersion 字段重新排序为降序...
VersionId MajorVersion
387276 2
365015 1
355427 3
369865 1
我怎么做?