コード例 #1
0
 public ActionResult SignUp(Account account)
 {
     if (ModelState.IsValid)
     {
         UserRespo.Add(account);
         return(RedirectToAction("LogIn"));
     }
     return(View());
 }
コード例 #2
0
        public ActionResult SignUp(SignUp signUp)
        {
            Account account = new Account();

            if (ModelState.IsValid)
            {
                account.Name        = signUp.Name;
                account.PhoneNumber = signUp.PhoneNumber;
                account.Gender      = signUp.Gender;
                account.MailID      = signUp.MailID;
                account.Password    = signUp.Password;
                UserRespo.Add(account);
                return(RedirectToAction("LogIn"));
            }
            return(View());
        }