[Solved] C# + get list from list [closed]


var summary = FullList
    .GroupBy(p => p.product_id)
    .Select(g => new {
       product_id = g.product_id,
       product_name = g.First().product_name,
       quantity = g.Sum(p => p.quantity)
     })
     .ToList();

As an exercise think about Concat for getting all the depot names.

2

solved C# + get list from list [closed]