User1140095199 posted
Hi,
Try the code below. Though I don't know the complete structure of the table you can refer to the following code and modify as per your need.
var pr = from p in db.ProductTable
group p by p.ContactID into datagroup
select new
{
contactID = datagroup.Key,
email = datagroup.FirstOrDefault().Email,
price = datagroup.Sum()
};
Hope it helps!
Best Regards!