Beispiel #1
0
        public void Exit(string accessToken)
        {
            const string commandText = @"Update chz_users
            Set access_token = null
            Where access_token = @access_token";

            var parameter = new UserAccessTokenParameter()
            {
                AccessToken = accessToken
            };
            var transaction = Transact <object> .Create(ConnectionString, commandText, parameter : parameter);

            transaction.ExecuteNonQuery();
        }
Beispiel #2
0
        public UserModel Get(string accessToken)
        {
            const string commandText = @"Select chz_user_id,first_name,last_name,login,password,access_token,date_time,is_lock
            From chz_users
            Where is_lock=0 And access_token = @access_token";

            var parameter = new UserAccessTokenParameter()
            {
                AccessToken = accessToken
            };
            var transaction = Transact <UserModel> .Create(ConnectionString, commandText, parameter : parameter);

            return(transaction.ExecuteReader().FirstOrDefault());
        }