LINQ C# Book

public void Linq83()
{
List products = GetProductList();

var categories =
from p in products
group p by p.Category into g
select new { Category = g.Key, CheapestPrice = g.Min(p => p.UnitPrice) };

ObjectDumper.Write(categories);
}
Result

Category=Beverages
Category=Condiments
Category=Produce
Category=Meat/Poultry
Category=Seafood
Category=Dairy Products
Category=Confections
Category=Grains/Cereals

CheapestPrice=4.5000
CheapestPrice=10.0000
CheapestPrice=10.0000
CheapestPrice=7.4500
CheapestPrice=6.0000
CheapestPrice=2.5000
CheapestPrice=9.2000
CheapestPrice=7.0000