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