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()); }
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()); }
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")); }