Exemplo n.º 1
0
 public ActionResult CreateClient(Client client)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _clientService.Create(client);
             return(RedirectToAction("EditClientList"));
         }
         catch (Exception ex)
         {
             ModelState.AddModelError(ex.GetHashCode().ToString(), ex.Message);
         }
     }
     return(View(client));
 }