Linq - OrderBy the minimum value of two columns using lambda expressions?
I have an entity set that contains two DateTime properties. I want to order the set by the minimum value of the two proper开发者_如何学Goties. How can I do this with a lambda expression.
myEntitySet.OrderBy(e => e.DateA < e.DateB ? e.DateA : e.DateB);
精彩评论