public IActionResult Edit([FromBody] EmpresaViewModel empViewModel) { try { if (ModelState.IsValid) { var emp = MapperHelper <EmpresaViewModel, Empresa> .ObjectTo(empViewModel); _serv.Edit(emp); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(BadRequest()); } return(Ok(true)); }