public ActionResult Register(UserInfo user)
 {
     var securityQuestions = _userRepository.GetSecurityQuestions();
     var listItems = new List<SelectListItem> { new SelectListItem { Text = "Select", Value = "" } };
     if (securityQuestions != null)
         securityQuestions.ToList().ForEach(x => listItems.Add(new SelectListItem { Text = x.Question, Value = Convert.ToString(x.Id) }));
     user.SecurityQuestions = listItems;
     ModelState.Clear();
     return View(user);
 }
 public ActionResult RegisterPost(UserInfo user)
 {
     if (!ModelState.IsValid) return View();
     var applicationUser = new ApplicationUser
     {
         FirstName = user.FirstName,
         LastName = user.LastName,
         Email = user.Email,
         PhoneNumber = user.PhoneNumber,
         UserName = user.UserName,
         LastLoginTime = DateTime.Now,
         Activated = true,
         SecurityQuestionId = user.SecurityQuestionId,
         SecurityAnswer = user.SecurityAnswer
     };
     return _userRepository.Register(applicationUser, user.Password, "Register", "Index");
 }