public ActionResult Update(int? id) { var viewModel = new ProductModel() { Id = id }; return View(viewModel); }
public ActionResult Update(int? id) { var viewModel = new ProductModel() { Id = id }; if (id.HasValue) { if (_productManager.FindProductByID(id.Value) == null) return HttpNotFound(); } return View(viewModel); }