Пример #1
0
 public ActionResult Update(int? id)
 {
     var viewModel = new ProductModel()
     {
         Id = id
     };
     return View(viewModel);
 }
Пример #2
0
 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);
 }