public IActionResult OnGet(int?id) { if (id.HasValue) { Person = personInMemory.GetPerson(id.Value); if (Person == null) { return(RedirectToPage("./List")); } } else { Person = new Person(); } MembershipTypes = membrshipInMemory.GetMembrships().Select(x => new SelectListItem { Value = x.Id.ToString(), Text = x.GetMembrshipType() }).ToList(); return(Page()); }
public void OnGet() { Membrships = membrshipInMemory.GetMembrships(); }