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