示例#1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SkillArea = await _skillAreaRepository.GetByIdAsync(id.Value);

            if (SkillArea == null)
            {
                return(NotFound());
            }
            return(Page());
        }
示例#2
0
        private async Task PersistAreaAndLevels(List <Skill> skills)
        {
            foreach (var entity in skills)
            {
                try
                {
                    entity.Area = await _skillAreaRepository.GetByIdAsync(entity.SkillAreaId);

                    entity.Level = await _skillLevelRepository.GetByIdAsync(entity.SkillLevelId);
                }
                catch (Exception ex)
                {
                    throw (ex);
                }
            }
        }
示例#3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            PopulateSelectListsAsync();

            if (id == null)
            {
                return(NotFound());
            }

            Skill = await _skillRepository.GetByIdAsync(id.Value);

            if (Skill == null)
            {
                return(NotFound());
            }
            return(Page());
        }