public ActionResult ManageProducts() { //get all product list and return that product list to manage product view ProductViewModel productModel = new ProductViewModel(); ShopServices service = new ShopServices(); //get product list from database productModel.ProductList = service.GetProductDetails(); return(View(productModel)); }
// GET: Shop public ActionResult Index() { ShopServices service = new ShopServices(); ShopModel shopmodel = new ShopModel(); HomeController homeController = new HomeController(); if (Session[SessionConstants.SESSION_CONTEXT_INSTANCE] != null) { User user = (User)(Session[SessionConstants.SESSION_CONTEXT_INSTANCE]); //get wishlist and cart details of the logged user shopmodel.headerDetails = homeController.CreateSessionModel(user.UserId, user.FullName); } else { shopmodel.headerDetails = null; } //get all product details to shop page shopmodel.ProductList = service.GetProductDetails(); return(View(shopmodel)); }