public IActionResult GetByIdCliente(int id) { try { var agendamentos = _agendamentoService.FindByIdCliente(id); if (agendamentos == null) { return(NoContent()); } return(Ok(_mapper.Map <IEnumerable <AgendamentosDto> >(agendamentos))); } catch (System.Exception) { return(StatusCode(500)); } }