public MySQLServerConnection CreateSystemConnection() { MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder(_cnnStr ?? ConnectionString); builder.Database = "mysql"; var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseMySQL(builder.ConnectionString); MySQLServerConnection c = CreateConnection(optionsBuilder.Options); return(c); }
public MySQLDatabaseCreator( [NotNull] MySQLServerConnection cxn, [NotNull] IMigrationsModelDiffer differ, [NotNull] IMigrationsSqlGenerator generator, [NotNull] IMigrationCommandExecutor migrationCommandExecutor, [NotNull] IModel model, [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder, [NotNull] IExecutionStrategyFactory executionStrategyFactory) : base(model, cxn, differ, generator, migrationCommandExecutor, executionStrategyFactory) { ThrowIf.Argument.IsNull(cxn, "connection"); ThrowIf.Argument.IsNull(differ, "modelDiffer"); ThrowIf.Argument.IsNull(generator, "generator"); ThrowIf.Argument.IsNull(rawSqlCommandBuilder, "commandBuilder"); _connection = cxn; _sqlGenerator = generator; _rawSqlCommandBuilder = rawSqlCommandBuilder; _migrationCommandExecutor = migrationCommandExecutor; }