How to perform LINQ OrderBy based on a stringname for column?

I think this previous questions might solve your problem Dynamic LINQ OrderBy Strongly typed dynamic Linq sorting or you can use the Dynamic Linq library.

The First method will perform the OrderBy (that is, given that the First method is executed of course). When the First method pulls the first item from the result of the OrderBy, it will have to sort all the items to find out which one is the first one. Depending on where and how the query is run (i.e.

If the query engine can't optimise around it), the second query can perform quite badly. Max is evaluated once for each item in Orders, it becomes an O(n*n) operation, which is pretty bad. There is a functional difference also, the second query can return more than one item if there are duplicate dates.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions