views:

50

answers:

1

I have an entity set that contains two DateTime properties. I want to order the set by the minimum value of the two properties. How can I do this with a lambda expression.

+7  A: 
myEntitySet.OrderBy(e => e.DateA < e.DateB ? e.DateA : e.DateB);
Shawn Simon