示例#1
0
        public ActionResult Register(RegistrationModel user)
        {
            if (ModelState.IsValid)
            {
                userRepository.Add(user.MapUser());
            }
            else
            {
                ModelState.AddModelError("", "Missing information");
                return(PartialView(user));
            }

            return(RedirectToAction("Index", "Home"));
        }