Exemple #1
0
        public ActionResult Create(Member member)
        {
            if (ModelState.IsValid)
            {
                var validationresult = memberFunction.Validate(member, memberRepository);
                if (validationresult.Count != 0)
                {
                    ModelState.Merge(validationresult);
                    return(View(member));
                }

                var MemberWithHash = memberFunction.CreateAccount(member);
                memberRepository.Add(MemberWithHash);
                return(RedirectToAction("Login"));
            }
            return(View(member));
        }