Esempio n. 1
0
 public RawDb(ConcurrentRandom random, DbProviderFactory dbProviderFactory)
 {
     _random            = random;
     _dbProviderFactory = dbProviderFactory;
     _connectionString  = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
     // _connectionString = "Server=192.168.2.19;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
     OnCreateCommand();
 }
Esempio n. 2
0
        public RawDb(ConcurrentRandom random, DbProviderFactory dbProviderFactory)
        {
            _random            = random;
            _dbProviderFactory = dbProviderFactory;
            _connectionString  = "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
            //_connectionString = "Server=192.168.2.19;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";


            for (int i = 0; i < 256; i++)
            {
                DbConnection conn = dbProviderFactory.CreateConnection();
                conn.ConnectionString = _connectionString;
                RawDbConnection rawDbConnection = new RawDbConnection(conn, this);
                mPool.Push(rawDbConnection);
            }
        }
Esempio n. 3
0
 public RawDb(ConcurrentRandom random, DbProviderFactory dbProviderFactory)
 {
     _random            = random;
     _dbProviderFactory = dbProviderFactory;
     OnCreateCommand();
 }