There are many similar questions on SO, but I'm not seeing one that fits my circumstances...
I'm wondering why this doesn't work to sort an IEnumerable of Premise objects:
sortedPremiseList = from p in premiseList
orderby (string.Format("{0} {1}", orderBy, sortOrder))
select p;
I'm passing in a valid p.property for the orderBy argument and "ascending" or "descending" for the sortOrder argument
And if I can't 'dynamicize' my LINQ in a limited fashion like this, what alternative is there beside a big ugly Switch statement or something like that?
Many thanks for your time.