I want to get the maximum record based on a field, but the Max() extension returns that given type. Say this:
o.Max(i => i.CreatedDate) // returns date
Returns the maximum date value; I want to return the record itself like:
o.Max(i => i.CreatedDate) // returns the record with the maximum condition
Is there a method to do this?
Thanks.
1 Answer