public static void Main(string[] args) { AW_ProductModelRepo prodModR = new AW_ProductModelRepo(); prodModR.CreateGetClothingProcedureIfNull(); PrintProductsByGender("Men%"); PrintProducts(); Console.ReadLine(); }
public ActionResult ListProductsByGender(string choice) { AW_ProductModelRepo aw_pmR = new AW_ProductModelRepo(); aw_pmR.CreateGetClothingProcedureIfNull(); if (choice == "") return View("Error"); List<AW_ProductModel> list = aw_pmR.GetProductsByGender(choice); return View(list); }
private static void PrintProductsByGender(string gender) { AW_ProductModelRepo aw_pmR = new AW_ProductModelRepo(); List<AW_ProductModel> products = aw_pmR.GetProductsByGender(gender); foreach (var prod in products) { Console.WriteLine("---------------------"); Console.WriteLine(prod.ProductModelID); Console.WriteLine(prod.Name); } }