public ActionResult Edit(string Id) { ProductCategory productCategory = context.Find(Id); if (productCategory == null) { return(HttpNotFound()); } else { return(View(productCategory)); } }
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)); } }