0

Suppose I have some data like:

enter image description here

I want to fetch data in an order like, first give me all with IsActive == true and sort it in an alphabetical order by account name and then the false one sorted by account name.

How can I do it by _context.table.OrderBy() or some other method?

Mansi
  • 313
  • 1
  • 5
  • 10

1 Answers1

0

You have to use OrderBy on IsActive and then ThenBy on AccountNameto sort the records.

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197