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