Consider a SQL Server table that\'s used to store events for auditing.
The need is to get only that latest entry for each CustID. We want to get the entire
Using LINQ syntax, which I think looks cleaner:
var custsLastAccess = from c in db.CustAccesses group c by c.CustID into grp select grp.OrderByDescending(c => c.AccessDate).FirstOrDefault();