I'm working on a system which stores an orderBy clause as a comma-separated string in a database.
This string can contain 0-3 elements.
Is there an elegant way to write a Linq query which would handle this, without resorting to a case statement?
Here's the gist of what I'm trying to do:
var instruments = from i in db.Instruments
orderby "Field1, Field2, Field3"
select i;