"Order by Col1, Col2" using entity framework
Solution 1:
Try OrderBy(x => x.Col1).ThenBy(x => x.Col2)
. It is a LINQ feature, anyway, not exclusive to EF.
Solution 2:
Another way:
qqq.OrderBy(x => new { x.Col1, x.Col2} )
Try OrderBy(x => x.Col1).ThenBy(x => x.Col2)
. It is a LINQ feature, anyway, not exclusive to EF.
Another way:
qqq.OrderBy(x => new { x.Col1, x.Col2} )