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