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