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