Ejemplo n.º 1
0
 public ActionResult Edit(ProductDetails model)
 {
     if (!ModelState.IsValid)
         return View(model);
     ProductService.Upsert(model);
     return RedirectToAction("Index");
 }
Ejemplo n.º 2
0
 public OperationResult Upsert(ProductDetails model)
 {
     try
     {
         ProductRepository.Upsert(model);
         return new OperationResult {Success = true, Message = string.Empty};
     }
     catch (Exception)
     {
         return new OperationResult { Success = false, Message = string.Empty };
         throw;
     }
 }