Reputation: 21275
How do I get this to work properly? I want order by duedate desc, type
I currently have:
billSummaryRepository.GetBillSummaries(logIn.CustomerNumber)
.OrderByDescending(o => o.DueDate)
.OrderBy(o => o.Type)
This works:
BillSummaries = billSummaryRepository.GetBillSummaries(logIn.CustomerNumber)
.OrderBy(o => o.Type)
.OrderByDescending(o => o.DueDate)
but how dangerous is that? Will it work?
Upvotes: 0
Views: 531
Reputation: 29130
BillSummaries = billSummaryRepository
.GetBillSummaries(logIn.CustomerNumber)
.OrderByDescending(o => o.DueDate)
.ThenBy(o => o.Type);
Upvotes: 2