public IActionResult OnGet(int?Id) { if (Id.HasValue) { Customer = customer.GetCustomerById(Id.Value); if (Customer == null) { return(RedirectToPage("./NotFound")); } } else { Customer = new Customer(); } var membership = memberShip.GetMemberShips().ToList().Select(p => new { Id = p.Id, Display = p.GetMemberShipType() }); MemberShips = new SelectList(membership, "Id", "Display"); return(Page()); }
public void OnGet() { Memberships = membershipData.GetMemberShips(); }