Example #1
0
 public HttpResponseMessage PutCliente(Clientes cliente)
 {
     try
     {
         repositorio.Atualiza(cliente);
         return(Request.CreateResponse(HttpStatusCode.Created));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
 public ActionResult Edit(Cliente cliente)
 {
     try
     {
         repositorio.Atualiza(cliente);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(cliente));
     }
 }