示例#1
0
        public Migrator(
            [NotNull] MigrationAssembly migrationAssembly,
            [NotNull] IHistoryRepository historyRepository,
            [NotNull] IDataStoreCreator dataStoreCreator,
            [NotNull] IMigrationSqlGenerator migrationSqlGenerator,
            [NotNull] SqlStatementExecutor executor,
            [NotNull] IRelationalConnection connection,
            [NotNull] IModelDiffer modelDiffer,
            [NotNull] IModel model,
            [NotNull] MigrationIdGenerator idGenerator,
            [NotNull] ISqlGenerator sqlGenerator)
        {
            Check.NotNull(migrationAssembly, nameof(migrationAssembly));
            Check.NotNull(historyRepository, nameof(historyRepository));
            Check.NotNull(dataStoreCreator, nameof(dataStoreCreator));
            Check.NotNull(migrationSqlGenerator, nameof(migrationSqlGenerator));
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(modelDiffer, nameof(modelDiffer));
            Check.NotNull(model, nameof(model));
            Check.NotNull(idGenerator, nameof(idGenerator));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _migrationAssembly     = migrationAssembly;
            _historyRepository     = historyRepository;
            _dataStoreCreator      = (IRelationalDataStoreCreator)dataStoreCreator;
            _migrationSqlGenerator = migrationSqlGenerator;
            _executor     = executor;
            _connection   = connection;
            _modelDiffer  = modelDiffer;
            _model        = model;
            _idGenerator  = idGenerator;
            _sqlGenerator = sqlGenerator;
        }
 public ConcreteDatabase(
     DbContext context,
     IRelationalDataStoreCreator dataStoreCreator,
     ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, loggerFactory)
 {
 }
 public ConcreteDatabase(
     DbContext context,
     IRelationalDataStoreCreator dataStoreCreator,
     ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, loggerFactory)
 {
 }
示例#4
0
        public Migrator(
            [NotNull] MigrationAssembly migrationAssembly,
            [NotNull] IHistoryRepository historyRepository,
            [NotNull] IDataStoreCreator dataStoreCreator,
            [NotNull] IMigrationSqlGenerator migrationSqlGenerator,
            [NotNull] SqlStatementExecutor executor,
            [NotNull] IRelationalConnection connection,
            [NotNull] IModelDiffer modelDiffer,
            [NotNull] IModel model,
            [NotNull] MigrationIdGenerator idGenerator,
            [NotNull] ISqlGenerator sqlGenerator)
        {
            Check.NotNull(migrationAssembly, nameof(migrationAssembly));
            Check.NotNull(historyRepository, nameof(historyRepository));
            Check.NotNull(dataStoreCreator, nameof(dataStoreCreator));
            Check.NotNull(migrationSqlGenerator, nameof(migrationSqlGenerator));
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(modelDiffer, nameof(modelDiffer));
            Check.NotNull(model, nameof(model));
            Check.NotNull(idGenerator, nameof(idGenerator));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _migrationAssembly = migrationAssembly;
            _historyRepository = historyRepository;
            _dataStoreCreator = (IRelationalDataStoreCreator)dataStoreCreator;
            _migrationSqlGenerator = migrationSqlGenerator;
            _executor = executor;
            _connection = connection;
            _modelDiffer = modelDiffer;
            _model = model;
            _idGenerator = idGenerator;
            _sqlGenerator = sqlGenerator;
        }
 public ConcreteRelationalDatabase(
     DbContext context,
     IRelationalDataStoreCreator dataStoreCreator,
     IRelationalConnection connection,
     Migrator migrator,
     ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, connection, migrator, loggerFactory)
 {
 }
 public ConcreteRelationalDatabase(
     DbContext context,
     IRelationalDataStoreCreator dataStoreCreator,
     IRelationalConnection connection,
     Migrator migrator,
     ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, connection, migrator, loggerFactory)
 {
 }
 public SqlServerDatabase(
     [NotNull] DbContext context,
     [NotNull] IRelationalDataStoreCreator dataStoreCreator,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IMigrator migrator,
     [NotNull] ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, connection, migrator, loggerFactory)
 {
 }
        public RelationalDatabase(
            [NotNull] DbContext context,
            [NotNull] IRelationalDataStoreCreator dataStoreCreator,
            [NotNull] IRelationalConnection connection,
            [NotNull] IMigrator migrator,
            [NotNull] ILoggerFactory loggerFactory)
            : base(context, dataStoreCreator, loggerFactory)
        {
            Check.NotNull(migrator, nameof(migrator));
            Check.NotNull(connection, nameof(connection));

            _migrator  = migrator;
            Connection = connection;
        }
        public SqlServerHistoryRepository(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalDataStoreCreator creator,
            [NotNull] DbContext context,
            [NotNull] ISqlServerSqlGenerator sqlGenerator)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(creator, nameof(creator));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _connection = connection;
            _creator = creator;
            _contextType = context.GetType();
            _sql = sqlGenerator;
        }
        public SqlServerHistoryRepository(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalDataStoreCreator creator,
            [NotNull] DbContext context,
            [NotNull] ISqlServerSqlGenerator sqlGenerator)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(creator, nameof(creator));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));

            _connection  = connection;
            _creator     = creator;
            _contextType = context.GetType();
            _sql         = sqlGenerator;
        }
        public RelationalDatabaseFactory(
            [NotNull] DbContext context,
            [NotNull] IRelationalDataStoreCreator dataStoreCreator,
            [NotNull] IRelationalConnection connection,
            [NotNull] IMigrator migrator,
            [NotNull] ILoggerFactory loggerFactory)
        {
            Check.NotNull(context, nameof(context));
            Check.NotNull(dataStoreCreator, nameof(dataStoreCreator));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(migrator, nameof(migrator));
            Check.NotNull(loggerFactory, nameof(loggerFactory));

            _context          = context;
            _dataStoreCreator = dataStoreCreator;
            _connection       = connection;
            _migrator         = migrator;
            _loggerFactory    = loggerFactory;
        }
        public RelationalDatabaseFactory(
            [NotNull] DbContext context,
            [NotNull] IRelationalDataStoreCreator dataStoreCreator,
            [NotNull] IRelationalConnection connection,
            [NotNull] IMigrator migrator,
            [NotNull] ILoggerFactory loggerFactory)
        {
            Check.NotNull(context, nameof(context));
            Check.NotNull(dataStoreCreator, nameof(dataStoreCreator));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(migrator, nameof(migrator));
            Check.NotNull(loggerFactory, nameof(loggerFactory));

            _context = context;
            _dataStoreCreator = dataStoreCreator;
            _connection = connection;
            _migrator = migrator;
            _loggerFactory = loggerFactory;
        }