public void TestInitialize()
        {
            EnvironmentHelper.AssertOracleClientIsInstalled();
            DatabaseProviderFactory factory = new DatabaseProviderFactory(OracleTestConfigurationSource.CreateConfigurationSource());
            db = factory.Create("OracleTest");
            storedProcedure = db.GetStoredProcCommand("NWND_CustOrdersOrders");
            connection = db.CreateConnection();
            connection.Open();
            storedProcedure.Connection = connection;
            cache = new ParameterCache();

            baseFixture = new ParameterDiscoveryFixture(storedProcedure);
        }
Ejemplo n.º 2
0
 public void SetParameters(DbCommand command, Database database)
 {
     if (command == null)
     {
         throw new ArgumentNullException(nameof(command));
     }
     if (database == null)
     {
         throw new ArgumentNullException(nameof(database));
     }
     if (this.AlreadyCached((IDbCommand)command, database))
     {
         this.AddParametersFromCache(command, database);
     }
     else
     {
         database.DiscoverParameters(command);
         IDataParameter[] parameterCopy = ParameterCache.CreateParameterCopy(command);
         this.cache.AddParameterSetToCache(database.ConnectionString, (IDbCommand)command, parameterCopy);
     }
 }