public async Task <IActionResult> Put(int id, [FromBody] CandidatoViewModel value) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var dto = _mapper.Map <CandidatoDto>(value); return(Ok(await _service.Editar(id, dto))); }