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