Is there a way to pass into a LINQ statement and do an order by via reflection? Basically I want to pass in a column name and the direction to sort. Usually you have to do order by x.ColumnName desc etc. Is there a way I can set the x.Column name based
on the column passed into the function. I could of course do a bunch of if statements and do a AsQueryable() and then update the query based on what column is being sorted by etc.
C# Code
Go to the complete details ...