예제 #1
0
        public void CreateUser(IUser user)
        {
            IHashedUser hashedUser = HandlerFactory.GetLoginHandler().CreateHashedUserInfo(user.Username, user.UserPassword);

            user.UserPassword = hashedUser.Password;
            user.Salt         = hashedUser.Salt;

            using (var conn = new SqlConnection(HandlerFactory.GetDBConnectionString()))
            {
                conn.Open();
                var identity = conn.Insert(user);
                conn.Close();
            }
        }