public ActionResult OnPostDeleteAsync(int id) { Event = repo.GetEvent(id); if (!ModelState.IsValid) { return(Page()); } repo.DeleteEvent(Event); return(RedirectToPage()); }
public IActionResult OnGet(int id) { Event = repo.GetEvent(id); return(Page()); }