var myList= (from t1 in liste group t1 by t1.ApprovalDate into x select new Invoice { CustomerID = x.FirstOrDefault().CustomerID, CustomerName = x.FirstOrDefault().CustomerName, CustomerSurname = x.FirstOrDefault().CustomerSurname, ApprovalDate = x.FirstOrDefault().ApprovalDate, Total = x.Sum(t => t.Total) } ).ToList();
ApprovalDate =l.ApprovalDate.Date
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)