I\'m creating a mock data source that I want to be able to pass in a list of SortExpressions on.
public SortExpression(string name, SortDirection direction)
The query is not mutable, so OrderBy returns a new object. You need to make the same call, but add "query =" to the beginning.
query = query.OrderBy(item => item.GetType().GetProperty(sortExpressions[i].Name));