Exemplo n.º 1
0
 public void Open()
 {
     SqlConnectionManager = new SqlConnectionManager(ConnectionString);
     SqlConnectionManager.Open();
     Server = new Server(new ServerConnection(SqlConnectionManager.DbConnection));
     Context.StatementTimeout = 0;
 }
Exemplo n.º 2
0
        public override IDbConnectionManager Clone()
        {
            SqlConnectionManager clone = new SqlConnectionManager(ConnectionString)
            {
                MaxLoginAttempts = this.MaxLoginAttempts
            };

            return(clone);
        }
Exemplo n.º 3
0
 private bool disposedValue = false; // To detect redundant calls
 protected void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             Server?.ConnectionContext?.Disconnect();
             if (SqlConnectionManager != null)
             {
                 SqlConnectionManager.Close();
             }
             SqlConnectionManager = null;
             Server = null;
         }
         disposedValue = true;
     }
 }
Exemplo n.º 4
0
 public void BulkInsert(IDataReader data, IColumnMappingCollection columnMapping, string tableName)
 => SqlConnectionManager.BulkInsert(data, columnMapping, tableName);
Exemplo n.º 5
0
 public SMOConnectionManager(ConnectionString connectionString)
 {
     RuntimePolicyHelper.SetNET20Compatibilty();
     ConnectionString     = connectionString;
     SqlConnectionManager = new SqlConnectionManager(connectionString);
 }