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