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