public ActionResult Edit(RepresentanteViewModel representante) { try { PessoaService.Atualizar(representante.MapearParaObjetoDominio()); return(Json(new { success = true, title = "Sucesso", message = "Representante cadastrado com sucesso !" }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { success = false, title = "Erro", message = ex.Message }, JsonRequestBehavior.AllowGet)); } }