20
.OrderBy(y => y.Year).ThenBy(m => m.Month);
descending
을 어떻게 설정합니까?linq 다중 순서 DESCENDING
편집 :
나는이 시도 :var result = (from dn in db.DealNotes
where dn.DealID == dealID
group dn by new { month = dn.Date.Month, year = dn.Date.Year } into date
orderby date.Key.year descending
orderby date.Key.month descending
select new DealNoteDateListView {
DisplayDate = date.Key.month + "-" + date.Key.year,
Month = date.Key.month,
Year = date.Key.year,
Count = date.Count()
})
//.OrderBy(y => y.Year).ThenBy(m => m.Month)
;
그리고 작업 보인다. orderby
을 두 번 사용하는 것과 같이 잘못 사용합니까?
대단히 감사합니다. 제 질문을 편집했습니다. 제발 좀보세요. –