public NpgsqlDataStoreServices(
            [NotNull] NpgsqlDataStore store,
            [NotNull] NpgsqlDataStoreCreator creator,
            [NotNull] NpgsqlEntityFrameworkConnection connection,
            [NotNull] NpgsqlValueGeneratorSelector valueGeneratorSelector,
            [NotNull] NpgsqlDatabase database,
            [NotNull] NpgsqlModelBuilderFactory modelBuilderFactory,
            [NotNull] NpgsqlModelDiffer modelDiffer,
            [NotNull] NpgsqlHistoryRepository historyRepository,
            [NotNull] NpgsqlMigrationSqlGenerator migrationSqlGenerator,
            [NotNull] NpgsqlModelSource modelSource)
        {
            Check.NotNull(store, "store");
            Check.NotNull(creator, "creator");
            Check.NotNull(connection, "connection");
            Check.NotNull(valueGeneratorSelector, "valueGeneratorSelector");
            Check.NotNull(database, "database");
            Check.NotNull(modelBuilderFactory, "modelBuilderFactory");
            Check.NotNull(modelDiffer, nameof(modelDiffer));
            Check.NotNull(historyRepository, nameof(historyRepository));
            Check.NotNull(migrationSqlGenerator, nameof(migrationSqlGenerator));
            Check.NotNull(modelSource, "migrator");

            _store                  = store;
            _creator                = creator;
            _connection             = connection;
            _valueGeneratorSelector = valueGeneratorSelector;
            _database               = database;
            _modelBuilderFactory    = modelBuilderFactory;
            ModelDiffer             = modelDiffer;
            HistoryRepository       = historyRepository;
            MigrationSqlGenerator   = migrationSqlGenerator;
            _modelSource            = modelSource;
        }
Beispiel #2
0
 public NpgsqlDatabase(
     [NotNull] DbContext context,
     [NotNull] NpgsqlDataStoreCreator dataStoreCreator,
     [NotNull] NpgsqlEntityFrameworkConnection connection,
     [NotNull] Migrator migrator,
     [NotNull] ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, connection, migrator, loggerFactory)
 {
 }
Beispiel #3
0
 public NpgsqlDataStore(
     [NotNull] IModel model,
     [NotNull] IEntityKeyFactorySource entityKeyFactorySource,
     [NotNull] IEntityMaterializerSource entityMaterializerSource,
     [NotNull] NpgsqlEntityFrameworkConnection connection,
     [NotNull] NpgsqlCommandBatchPreparer batchPreparer,
     [NotNull] NpgsqlBatchExecutor batchExecutor,
     [NotNull] IDbContextOptions options,
     [NotNull] ILoggerFactory loggerFactory)
     : base(model, entityKeyFactorySource, entityMaterializerSource,
            connection, batchPreparer, batchExecutor, options, loggerFactory)
 {
 }
Beispiel #4
0
        public NpgsqlDataStoreCreator(
            [NotNull] NpgsqlEntityFrameworkConnection connection,
            [NotNull] NpgsqlModelDiffer modelDiffer,
            [NotNull] NpgsqlMigrationSqlGenerator sqlGenerator,
            [NotNull] SqlStatementExecutor statementExecutor)
        {
            Check.NotNull(connection, "connection");
            Check.NotNull(modelDiffer, "modelDiffer");
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(statementExecutor, "statementExecutor");

            _connection        = connection;
            _modelDiffer       = modelDiffer;
            _sqlGenerator      = sqlGenerator;
            _statementExecutor = statementExecutor;
        }
        public NpgsqlValueGeneratorSelector(
            [NotNull] INpgsqlValueGeneratorCache cache,
            [NotNull] NpgsqlSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ValueGeneratorFactory <SequentialGuidValueGenerator> sequentialGuidFactory,
            [NotNull] NpgsqlEntityFrameworkConnection connection
            )
        {
            Check.NotNull(cache, nameof(cache));
            Check.NotNull(sequenceFactory, "sequenceFactory");
            Check.NotNull(sequentialGuidFactory, "sequentialGuidFactory");
            Check.NotNull(connection, "connection");

            _cache                 = cache;
            _sequenceFactory       = sequenceFactory;
            _sequentialGuidFactory = sequentialGuidFactory;
            _connection            = connection;
        }