【发布时间】:2011-06-12 15:47:55
【问题描述】:
我想获得基于字段的最大记录,但 Max() 扩展返回该给定类型。这么说:
o.Max(i => i.CreatedDate) // returns date
返回最大日期值;我想像这样返回记录本身:
o.Max(i => i.CreatedDate) // returns the record with the maximum condition
有没有办法做到这一点?
谢谢。
【问题讨论】:
标签: c# asp.net entity-framework ado.net entity-framework-4