예제 #1
0
        public async Task <IActionResult> AddOrUpdate(int?id)
        {
            ILevelDto level = new LevelDto();

            if (id != null)
            {
                level = await _levelBusiness.GetLevel(Convert.ToInt32(id));
            }
            return(View(level));
        }
        public async Task <IActionResult> GetLevel(int id)
        {
            var result = await _levelBusiness.GetLevel(id);

            if (result != null)
            {
                return(Ok(result));
            }

            return(NotFound());
        }