【C# .net】GROUP BYのやり方【EntityFramework LINQ】

var groupedProducts = from product in products
        group product by product.Category into g
        select new { Category = g.Key, Count = g.Count() };

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です