public ActionResult Create() { ProductManagerViewModule viewModel = new ProductManagerViewModule(); viewModel.Product = new Product(); viewModel.ProductCategories = productCategories.Collection(); return(View(viewModel)); }
public ActionResult Edit(string Id) { Product product = context.Find(Id); if (product == null) { return(HttpNotFound()); } else { ProductManagerViewModule viewModel = new ProductManagerViewModule(); viewModel.Product = product; viewModel.ProductCategories = productCategories.Collection(); return(View(viewModel)); } }