Example #1
0
        public IActionResult OnPost(int?id)
        {
            if (id == null)
            {
                return(RedirectToPage("NotFound"));
            }

            if (Membership.Id == 0)
            {
                return(RedirectToPage("./Edit"));
            }

            if (Membership != null)
            {
                Membership = membershipData.DeleteMembership(Membership.Id);
            }
            membershipData.Commit();
            return(RedirectToPage("./List"));
        }