Example #1
0
        public ActionResult CategoryMenu()
        {
            var productWrapper   = new ProductWrapper();
            var getAllCategories = productWrapper.GetAllCategories();

            return(PartialView("_CategoryMenu", getAllCategories));
        }
Example #2
0
        public ActionResult CategoryProduct(int categoryId)
        {
            var productWrapper   = new ProductWrapper();
            var getAllCategories = productWrapper.GetAllCategories();

            var productCategoryList = getAllCategories.Single(x => x.CategoryId == categoryId);
            var productList         = productCategoryList.Products.ToList();

            return(View("Index", productList));
        }