Пример #1
0
        public DbCmd(ConnectionProvider provider, string script)
        {
            this.script = script
                          .Replace("$DB_SYSTEM", Const.DB_SYSTEM)
                          .Replace("$DB_APPLICATION", Const.DB_APPLICATION);

            this.provider   = provider;
            this.dbProvider = provider.CreateDbProvider(script);
        }
Пример #2
0
        public virtual void ChangeConnection(ConnectionProvider provider)
        {
            if (this.connection.State != ConnectionState.Closed)
            {
                this.connection.Close();
            }

            this.dbProvider         = provider.CreateDbProvider(this.script);
            this.command.Connection = provider.NewDbConnection;
        }