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