public ActionResult AddNewProduct()
        {
            var model = new AdminAddNewViewModel {
                Products = _productService.GetAllProducts()
            };

            return(View(model));
        }
Пример #2
0
        public ActionResult Products()
        {
            var user  = _userService.GetUser(System.Web.HttpContext.Current.User.Identity.Name);
            var model = new AdminAddNewViewModel {
                Products = _productService.GetAllProducts()
            };

            model.UserId = user.Id;
            return(View(model));
        }