public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } SkillLevel = await _skillLevelRepository.GetByIdAsync(id.Value); if (SkillLevel == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } SkillLevel = await _skillLevelRepository.GetByIdAsync(id.Value); if (SkillLevel != null) { await _skillLevelRepository.DeleteAsync(SkillLevel); } return(RedirectToPage("./Index")); }