var records = (from i in list group i by i.CartID into g select new Item() { RecordID = g.Min(o => o.RecordID), CartID = g.Key, Quantity = g.Sum(o => o.Quantity), ProductID = g.Min(o => o.ProductID) }).ToList();
This sums all the quantity of items with the same CartId creating only the min occurent RecordId and ProductId as you asked. Selecting the min ProductId is something I needed to do to make the query work.
That is why I think you miss some grouping on ProductId...
You did not ask for this, but I think this is what you want (because it makes common sense to not group apples and pears together). (It gives the same result on the sample data provided but for different ProductsIds it will have different results.
var records = (from i in list group i by new { cartID = i.CartID, prodID = i.ProductID } into g select new Item() { RecordID = g.Min(o => o.RecordID), CartID = g.Key.cartID, Quantity = g.Sum(o => o.Quantity), ProductID = g.Key.prodID }).ToList();
This groups by CartID and ProductId. Multi-field grouping in Linq is achieved with anonymous types.