public async Task <IActionResult> Post([FromBody] CandidatoViewModel value) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var dto = _mapper.Map <CandidatoDto>(value); return(Ok(await _service.Cadastrar(dto))); }
public int Cadastrar(CandidatoInclusaoVM entity) => _service.Cadastrar(MapperUtils.Map <CandidatoInclusaoVM, Candidato>(entity));