Пример #1
0
        public IActionResult Get()
        {
            try
            {
                var agendamentos = _agendamentoService.FindAll();

                if (agendamentos.Count < 1)
                {
                    return(NoContent());
                }

                return(Ok(_mapper.Map <IEnumerable <AgendamentosDto> >(agendamentos)));
            }
            catch (System.Exception)
            {
                return(StatusCode(500));
            }
        }