Friday, June 15, 2012

linq simple group by query sample

var orderGroups =
        from p in products
        group p by p.Category into g
        select new { Category = g.Key, Products = g };

No comments:

Post a Comment