public ActionResult Put([FromBody] UpdateAgendamentoDTO updateAgendamentoDTO) { try { _agendamentoService.Update(updateAgendamentoDTO); return(Ok()); } catch (Exception e) { string errors = e.Message; return(ValidationProblem(new ValidationProblemDetails() { Type = "Model Validation Error", Detail = errors })); } }
public void Update(UpdateAgendamentoDTO model) { var agendamento = _mapper.Map <UpdateAgendamentoCommand>(model); _bus.SendCommand(agendamento); }