public ActionResult Register(RegistrationModel user) { if (ModelState.IsValid) { userRepository.Add(user.MapUser()); } else { ModelState.AddModelError("", "Missing information"); return(PartialView(user)); } return(RedirectToAction("Index", "Home")); }