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