Exemple #1
0
        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());
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        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"));
        }