Exemplo n.º 1
0
 public void Use(string databaseName)
 {
     if (databaseName == null)
     {
         databaseName = Default;
     }
     currentConnection = GetConnection(databaseName);
 }
Exemplo n.º 2
0
 private InternalDatabaseConnection GetInstance()
 {
     if (currentConnection == null)
     {
         currentConnection = GetConnection(Default);
     }
     return(currentConnection);
 }
Exemplo n.º 3
0
        private InternalDatabaseConnection GetConnection(string databaseName)
        {
            if (connections.ContainsKey(databaseName))
            {
                return(connections[databaseName]);
            }

            InternalDatabaseConnection connection =
                new InternalDatabaseConnection(databaseName);

            connections[databaseName] = connection;
            return(connection);
        }
Exemplo n.º 4
0
 public void Use(string databaseName)
 {
     if (databaseName == null)
     {
         databaseName = Default;
     }
     currentConnection = GetConnection(databaseName);
 }
Exemplo n.º 5
0
 private InternalDatabaseConnection GetInstance()
 {
     if (currentConnection == null)
     {
         currentConnection = GetConnection(Default);
     }
     return currentConnection;
 }
Exemplo n.º 6
0
        private InternalDatabaseConnection GetConnection(string databaseName)
        {
            if (connections.ContainsKey(databaseName))
            {
                return connections[databaseName];
            }

            InternalDatabaseConnection connection =
                new InternalDatabaseConnection(databaseName);
            connections[databaseName] = connection;
            return connection;
        }