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