I have a table like this (Table name: Posts):
+----+--------------------------+-------+------------+ | id | content | type | date | +
If you want to get the whole Posts. You can try this:
var query = Posts.GroupBy(p => p.Type) .Select(g => g.OrderByDescending(p => p.Date) .FirstOrDefault() )