I\'m using LINQ on an IQueryable returned from NHibernate and I need to select the row with the maximum value(s) in a couple of fields.
I\'ve simplified the bit tha
Simply in one line:
var result = table.First(x => x.Status == table.Max(y => y.Status));
Notice that there are two action. the inner action is for finding the max value, the outer action is for get the desired object.