public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ArenaSection = await _context.ArenaSection .Include(a => a.Arena).FirstOrDefaultAsync(m => m.Id == id); if (ArenaSection == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ArenaSection = await _context.ArenaSection .Include(a => a.Arena).FirstOrDefaultAsync(m => m.Id == id); if (ArenaSection == null) { return(NotFound()); } ViewData["ArenaId"] = new SelectList(_context.Arena, "Id", "Id"); return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ArenaSection = await _context.ArenaSection.FindAsync(id); if (ArenaSection != null) { _context.ArenaSection.Remove(ArenaSection); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }