Example #1
0
 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());
 }
Example #2
0
 public void OnGet()
 {
     Membrships = membrshipInMemory.GetMembrships();
 }