Esempio n. 1
0
 public static IServer GetServer(DatabaseBrand databaseBrand, string connectionString)
 {
     switch (databaseBrand)
     {
         case DatabaseBrand.PostgreSql:
             return new PostgreSqlServer(connectionString);
         default:
             throw new ArgumentOutOfRangeException("databaseBrand");
     }
 }
Esempio n. 2
0
 public static IDatabase GetDatabase(DatabaseBrand databaseBrand, string connectionString, string databaseName)
 {
     switch (databaseBrand)
     {
         case DatabaseBrand.PostgreSql:
             return new PostgreSqlDatabase(connectionString, databaseName);
         default:
             throw new ArgumentOutOfRangeException("databaseBrand");
     }
 }
Esempio n. 3
0
        public static IDatabase GetDatabase(DatabaseBrand databaseBrand, string connectionString, string databaseName)
        {
            switch (databaseBrand)
            {
            case DatabaseBrand.PostgreSql:
                return(new PostgreSqlDatabase(connectionString, databaseName));

            default:
                throw new ArgumentOutOfRangeException("databaseBrand");
            }
        }
Esempio n. 4
0
        public static IServer GetServer(DatabaseBrand databaseBrand, string connectionString)
        {
            switch (databaseBrand)
            {
            case DatabaseBrand.PostgreSql:
                return(new PostgreSqlServer(connectionString));

            default:
                throw new ArgumentOutOfRangeException("databaseBrand");
            }
        }
Esempio n. 5
0
 public static Target GetTarget(DatabaseBrand databaseBrand, string connectionString, string databaseName)
 {
     return(new Target(GetServer(databaseBrand, connectionString), GetDatabase(databaseBrand, connectionString, databaseName)));
 }
Esempio n. 6
0
 public static Target GetTarget(DatabaseBrand databaseBrand, string connectionString, string databaseName)
 {
     return new Target(GetServer(databaseBrand, connectionString), GetDatabase(databaseBrand, connectionString, databaseName));
 }