Esempio n. 1
0
        public IActionResult OnPost()
        {
            if (ModelState.IsValid)
            {
                if (MembershipExists(Membership.Id) == false)
                {
                    Membership = membershipData.CreateMembership(Membership);
                }
                else
                {
                    Membership = membershipData.Update(Membership);
                }

                membershipData.Commit();
                return(RedirectToPage("./List"));
            }

            return(Page());
        }