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()); }
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); } } }
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()); }