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()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } SkillArea = await _skillAreaRepository.GetByIdAsync(id.Value); if (SkillArea != null) { await _skillAreaRepository.DeleteAsync(SkillArea); } return(RedirectToPage("./Index")); }