Ejemplo n.º 1
0
 public void Use(string databaseName)
 {
     if (databaseName == null)
     {
         databaseName = Default;
     }
     currentConnection = GetConnection(databaseName);
 }
Ejemplo n.º 2
0
 private InternalDatabaseConnection GetInstance()
 {
     if (currentConnection == null)
     {
         currentConnection = GetConnection(Default);
     }
     return(currentConnection);
 }
Ejemplo 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);
        }
Ejemplo n.º 4
0
 public void Use(string databaseName)
 {
     if (databaseName == null)
     {
         databaseName = Default;
     }
     currentConnection = GetConnection(databaseName);
 }
Ejemplo n.º 5
0
 private InternalDatabaseConnection GetInstance()
 {
     if (currentConnection == null)
     {
         currentConnection = GetConnection(Default);
     }
     return currentConnection;
 }
Ejemplo 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;
        }