I have a List object. I am converting this to IQueryable by calling a method AsQueryable().
I need to do sorting on multiple columns say for ex. four columns say col1, col2 col3 & col4 using the expressing tree only. Any one has ideas, how to do that.
What I have tried:
List<employee> obj = new List<employee> query = obj.AsQueryable<employee>()
var paramterExpression = Expression.Parameter(typeof(Employee));
Expression<func><employee> orderByExpression = (Expression<func><employee>)Expression.Lambda(Expression.PropertyOrField(paramterExpression, "EmpName"), paramterExpression);
the above code is for one column, for the second column some people are saying to use thenby. beyond that nobody says how to do that.