开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜