Пример #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            PlayerSelction = await _context.PlayerSelction
                             .Include(p => p.Member).FirstOrDefaultAsync(m => m.PlayerSelctionId == id);

            if (PlayerSelction == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Пример #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            PlayerSelction = await _context.PlayerSelction
                             .Include(p => p.Member).FirstOrDefaultAsync(m => m.PlayerSelctionId == id);

            if (PlayerSelction == null)
            {
                return(NotFound());
            }
            ViewData["Memberid"] = new SelectList(_context.Member, "MemberId", "MemberId");
            return(Page());
        }
Пример #3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            PlayerSelction = await _context.PlayerSelction.FindAsync(id);

            if (PlayerSelction != null)
            {
                _context.PlayerSelction.Remove(PlayerSelction);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }