This is my query in Tsql : SELECT TOP 10 [ActionID], [ActionType], [ObjectID], MAX(date) FROM [dbo].[UserHistory] WHERE [EntityType] = 3 AND [UserID] = 1 GROUP BY [ActionID], [ActionType], [ObjectID], ORDER BY MAX(date) desc Following the other thread post about Linq group by multiple columns, I came up with the following linq query: var result = from i in (from uh in db.UserHistories where uh.User.UserID == UserID && uh.CRMEntityID == (int)entity select new { uh.ActionID, uh.ActionType, uh.ObjectID
Read More...