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