Esempio n. 1
0
        public ActionResult Edit(string Id)
        {
            ProductCategory productCategory = context.Find(Id);

            if (productCategory == null)
            {
                return(HttpNotFound());
            }
            else
            {
                return(View(productCategory));
            }
        }
Esempio n. 2
0
        public ActionResult Edit(string Id)
        {
            Product product = context.Find(Id);

            if (product == null)
            {
                return(HttpNotFound());
            }
            else
            {
                ProductManagerViewModel viewModel = new ProductManagerViewModel();
                viewModel.Product           = new Product();
                viewModel.ProductCategories = productCategories.Collection();
                return(View(viewModel));
            }
        }