I have a list of objects that have a following structure
public class Order
{
public Guid OrderId { get;set;}
public DateTime OrderDate {get;set;}
public Guid CustomerId { get;set;}
}
From the list I have to chose for each customer newest order. I know I need to use group by CustomerId, but how do I select only newest order from the group? Thanks