In LINQ, is it possible to have conditional orderby sort order (ascending vs. descending).
Something like this (not valid code):
bool flag; (from w
...Or do it all in one statement
bool flag; var result = from w in widgets where w.Name.Contains("xyz") orderby flag ? w.Id : 0, flag ? 0 : w.Id descending select w;