public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } StudentOutcome = await _context.StudentOutcome.FirstOrDefaultAsync(m => m.Id == id); if (StudentOutcome == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } StudentOutcome = await _context.StudentOutcome.FindAsync(id); if (StudentOutcome != null) { _context.StudentOutcome.Remove(StudentOutcome); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }