示例#1
0
        public IDbCommand GetIDbCommand()
        {
            MySqlCommand mySqlCommand = null;

            if (this._con == null)
            {
                this._con = this._con ?? new MySqlConnection(MySqlDbConnectionConfig.GetSqlDbConntionConfigure());
            }
            if (this._con.State == ConnectionState.Closed)
            {
                this._con.Open();
            }
            mySqlCommand = this._con.CreateCommand();
            return(mySqlCommand);
        }
示例#2
0
 public IDbConnection GetIDbConnection()
 {
     this._con = this._con ?? new MySqlConnection(MySqlDbConnectionConfig.GetSqlDbConntionConfigure());
     return(this._con);
 }