public ActionResult CustomerIndex() { var allProducts = new DAL.CRUDProduct().GetProducts(); var allprodoctindexModelList = new List <Models.ProductIndexModel>(); foreach (var item in allProducts) { allprodoctindexModelList.Add(new Models.ProductIndexModel() { Id = item.Id, Image = item.Image, Name = item.Name, UnitPrice = item.UnitPrice }); } return(View(allprodoctindexModelList)); }
public ActionResult ProductIndexV3() { var allProducts = new DAL.CRUDProduct().GetProducts(); return(View(allProducts)); }
// GET: Product public ActionResult Index() //for the admin to checkout the list of products. { var allProducts = new DAL.CRUDProduct().GetProducts(); return(View(allProducts)); }