public Configuration(Options options) { this.Scope = options.Scope; if (!string.IsNullOrEmpty(options.DatabaseType) && options.DatabaseType == "mysql") { this.ConnectionProviderType = typeof(MySqlConnectionProvider); this.SchemaProviderType = typeof(MySqlSchemaProvider); } else if (!string.IsNullOrEmpty(options.DatabaseType) && options.DatabaseType == "pgsql") { this.ConnectionProviderType = typeof(PostgreSQLConnectionProvider); this.SchemaProviderType = typeof(PostgreSQLSchemaProvider); } else { this.ConnectionProviderType = typeof(SqlServerConnectionProvider); this.SchemaProviderType = typeof(SqlServerSchemaProvider); } this.TransactionProviderType = typeof(TransactionProvider); this.DatabaseProviderType = typeof(AdoNetDatabaseProvider); this.MigrationsDirectory = options.MigrationsDirectory; this.CompilerVersion = options.CompilerVersion; this.DesiredVersion = options.ToMigration; this.ShowDiagnostics = options.ShowDiagnostics; this.References = options.References.ToArray(); this.CommandTimeout = options.CommandTimeout; _connectionStrings = options.ParseConnectionStrings(); }
public Configuration(Options options) { Scope = options.Scope; DriverAssemblyName = options.DriverAssemblyName; setDatabaseOptions(options); MigrationsDirectory = options.MigrationsDirectory; CompilerVersion = options.CompilerVersion; DesiredVersion = options.ToMigration; ShowDiagnostics = options.ShowDiagnostics; References = options.References.ToArray(); CommandTimeout = options.CommandTimeout; _connectionStrings = options.ParseConnectionStrings(); }
public Configuration(Options options) { this.Scope = options.Scope; if (!string.IsNullOrEmpty(options.DatabaseType) && options.DatabaseType == "mysql") { this.ConnectionProviderType = typeof(MySqlConnectionProvider); this.SchemaProviderType = typeof(MySqlSchemaProvider); } else { this.ConnectionProviderType = typeof(SqlServerConnectionProvider); this.SchemaProviderType = typeof(SqlServerSchemaProvider); } this.TransactionProviderType = typeof(TransactionProvider); this.DatabaseProviderType = typeof(AdoNetDatabaseProvider); this.MigrationsDirectory = options.MigrationsDirectory; this.CompilerVersion = options.CompilerVersion; this.DesiredVersion = options.ToMigration; this.ShowDiagnostics = options.ShowDiagnostics; this.References = options.References.ToArray(); this.CommandTimeout = options.CommandTimeout; _connectionStrings = options.ParseConnectionStrings(); }