Q:

LINQ OrderBy only on second property

I have a list like
| column1 | column2 |
|    1    |   72    |
|    2    |   30    |
|    3    |   27    |
|    3    |   38    |
|    4    |   72    |

As you can see, the list is already sorted on column1, my goal here is to perform an OrderByDescending on the second column only on equals columns 1.  Basically, I want
| column1 | column2 |
|    1    |   72    |
|    2    |   30    |
|    3    |   38    |
|    3    |   27    |
|    4    |   72    |

I can't re-run the first OrderBy (that'll be hard to explain, we don't care, I just cant :D) so forget about
list. OrderBy(e => e.column1).ThenByDescending(e => e.column2)
In fact, I wouldn't have any problem if I could simply do a .ThenByDescending(e => e.column2) without having to do the .OrderBy (maybe I can run an "empty" OrderBy that won't change the sort ?  Then I would be able to do the ThenByDescending ?) 

A:

list. OrderBy(e => e.column1).ThenByDescending(e => e.column2) is still the way to go. 
The algorithm has to know it has to sort on e.column1 first, no matter if it actually changes something or not.  It has to know it only has to sort e.column2 within the subset of the first sorting statement.  You can't do that with 'just' sorting on column2. 

A:

list. GroupBy(i => i.column1).SelectMany(i => i.OrderByDescending(g => g.column2))

Will work with many providers, but some may not preserve the ordering in the GroupBy.  In such a case:
list. AsEnumerable().GroupBy(i => i.column1).SelectMany(i => i.OrderByDescending(g => g.column2))

Will work by forcing the operation into memory (where the ordering is preserved by GroupBy), though with the disadvantage of all subsequent operations being done in-memory rather than on a DB etc.