var groupList1 = grantCard.GroupBy(x => new { x.ProductId }).Select(group => new { ProductId = group.Key, Quantity = group.Count() }).ToList();
c# GroupBy的使用
最新推荐文章于 2025-03-08 07:15:00 发布
var groupList1 = grantCard.GroupBy(x => new { x.ProductId }).Select(group => new { ProductId = group.Key, Quantity = group.Count() }).ToList();