private static void PrintProducts() { AW_ProductRepo aw_pR = new AW_ProductRepo(); List<AW_Product> products = aw_pR.GetAll(); foreach (var prod in products) { Console.WriteLine("-------------------"); Console.WriteLine(prod.ProductID); Console.WriteLine(prod.Name); Console.WriteLine(prod.Color); Console.WriteLine(prod.ListPrice); Console.WriteLine(prod.Size); Console.WriteLine(prod.SizeUnitMeasureCode); Console.WriteLine(prod.WeightUnitMeasureCode); } }
public ActionResult Top5Products() { AW_ProductRepo aw_pR = new AW_ProductRepo(); List<AW_Product> list = aw_pR.GetAll(); return View(list); }