public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ListaInteresado = await _context.ListaInteresado .Include(l => l.Evento).FirstOrDefaultAsync(m => m.Id == id); if (ListaInteresado == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ListaInteresado = await _context.ListaInteresado .Include(l => l.Evento).FirstOrDefaultAsync(m => m.Id == id); if (ListaInteresado == null) { return(NotFound()); } ViewData["EventoId"] = new SelectList(_context.Evento, "Id", "Descripcion"); return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ListaInteresado = await _context.ListaInteresado.FindAsync(id); if (ListaInteresado != null) { _context.ListaInteresado.Remove(ListaInteresado); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }