Пример #1
0
        public async Task <IActionResult> GetLevels()
        {
            try
            {
                var levels = await levelService.GetAllLevels();

                if (levels == null)
                {
                    return(NotFound());
                }
                return(Ok(levels));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
Пример #2
0
 public ActionResult <IEnumerable <LevelReadDto> > GetAllLevels()
 {
     return(Ok(_service.GetAllLevels()));
 }