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