0

I need to order a query result by two fields using LINQ.

How do I do that?

Fabio Milheiro
  • 7,239
  • 13
  • 51
  • 87
  • possible duplicate of [linq: multiple order by](http://stackoverflow.com/questions/298725/linq-multiple-order-by) – Dan Puzey Apr 08 '11 at 09:33
  • It could be a duplicate but not for the keywords "LINQ Order by two fields". The subject is the same but I searched I simple could not find the question. Duplicate syndrome is pretty much the only problem with this site. – Fabio Milheiro Apr 08 '11 at 09:51

1 Answers1

4
.OrderBy(x => x..)
.ThenBy(x => ..)  
stuartd
  • 62,136
  • 13
  • 120
  • 150