如何让它正常工作?我想要order by duedate desc, type
我目前有:
billSummaryRepository.GetBillSummaries(logIn.CustomerNumber)
.OrderByDescending(o => o.DueDate)
.OrderBy(o => o.Type)
这有效:
BillSummaries = billSummaryRepository.GetBillSummaries(logIn.CustomerNumber)
.OrderBy(o => o.Type)
.OrderByDescending(o => o.DueDate)
但那有多危险?它会起作用吗?
答案 0 :(得分:2)
BillSummaries = billSummaryRepository
.GetBillSummaries(logIn.CustomerNumber)
.OrderByDescending(o => o.DueDate)
.ThenBy(o => o.Type);