public SqlServerDatabase(
     [NotNull] IModel model,
     [NotNull] IEntityKeyFactorySource entityKeyFactorySource,
     [NotNull] IEntityMaterializerSource entityMaterializerSource,
     [NotNull] IClrAccessorSource <IClrPropertyGetter> clrPropertyGetterSource,
     [NotNull] ISqlServerConnection connection,
     [NotNull] ICommandBatchPreparer batchPreparer,
     [NotNull] IBatchExecutor batchExecutor,
     [NotNull] IDbContextOptions options,
     [NotNull] ILoggerFactory loggerFactory,
     [NotNull] IRelationalValueBufferFactoryFactory valueBufferFactoryFactory,
     [NotNull] IMethodCallTranslator compositeMethodCallTranslator,
     [NotNull] IMemberTranslator compositeMemberTranslator,
     [NotNull] IRelationalTypeMapper typeMapper,
     [NotNull] IRelationalMetadataExtensionProvider relationalExtensions)
     : base(
         model,
         entityKeyFactorySource,
         entityMaterializerSource,
         clrPropertyGetterSource,
         connection,
         batchPreparer,
         batchExecutor,
         options,
         loggerFactory,
         valueBufferFactoryFactory,
         compositeMethodCallTranslator,
         compositeMemberTranslator,
         typeMapper,
         relationalExtensions)
 {
 }
Ejemplo n.º 2
0
        public SqlServerSender(ISqlServerConnection connection, ISqlServerCommand command)
        {
            _connection = connection;
            _connection.Open();

            _command = command;
        }
Ejemplo n.º 3
0
 public TestDatabaseCreator(
     RelationalDatabaseCreatorDependencies dependencies,
     ISqlServerConnection connection,
     IRawSqlCommandBuilder rawSqlCommandBuilder)
     : base(dependencies, connection, rawSqlCommandBuilder)
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerCompiledQueryCacheKeyGenerator(
     CompiledQueryCacheKeyGeneratorDependencies dependencies,
     RelationalCompiledQueryCacheKeyGeneratorDependencies relationalDependencies,
     ISqlServerConnection sqlServerConnection)
     : base(dependencies, relationalDependencies)
 {
     _sqlServerConnection = sqlServerConnection;
 }
 public SqlServerDatabase(
     [NotNull] DbContext context,
     [NotNull] IRelationalDataStoreCreator dataStoreCreator,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IMigrator migrator,
     [NotNull] ILoggerFactory loggerFactory)
     : base(context, dataStoreCreator, connection, migrator, loggerFactory)
 {
 }
 public SqlServerSagaPersistance(ISqlServerConnection sqlServerConnection, IDateTimeProvider dateTimeProvider, SqlServerOptions sqlServerOptions)
 {
     this.instances                   = new Dictionary <Guid, string>();
     this.sqlServerConnection         = sqlServerConnection;
     this.dateTimeProvider            = dateTimeProvider;
     this.sqlServerOptions            = sqlServerOptions;
     this.weakInMemorySagaPersistance = new WeakInMemorySagaPersistance(
         TimeSpan.FromSeconds(15));
 }
 public TestDatabaseCreator(
     ISqlServerConnection connection,
     IMigrationsModelDiffer modelDiffer,
     IMigrationsSqlGenerator sqlGenerator,
     ISqlStatementExecutor statementExecutor,
     IModel model)
     : base(connection, modelDiffer, sqlGenerator, statementExecutor, model)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerDatabaseCreator(
     RelationalDatabaseCreatorDependencies dependencies,
     ISqlServerConnection connection,
     IRawSqlCommandBuilder rawSqlCommandBuilder)
     : base(dependencies)
 {
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
 }
Ejemplo n.º 9
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerQueryCompilationContextFactory(
     QueryCompilationContextDependencies dependencies,
     RelationalQueryCompilationContextDependencies relationalDependencies,
     ISqlServerConnection sqlServerConnection)
 {
     Dependencies           = dependencies;
     RelationalDependencies = relationalDependencies;
     _sqlServerConnection   = sqlServerConnection;
 }
 public TestDatabaseCreator(
     ISqlServerConnection connection,
     IMigrationsModelDiffer modelDiffer,
     IMigrationsSqlGenerator sqlGenerator,
     IModel model,
     IRawSqlCommandBuilder rawSqlCommandBuilder)
     : base(connection, modelDiffer, sqlGenerator, model, rawSqlCommandBuilder)
 {
 }
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public virtual ValueGenerator Create(IProperty property, SqlServerSequenceValueGeneratorState generatorState, ISqlServerConnection connection)
        {
            Check.NotNull(property, nameof(property));
            Check.NotNull(generatorState, nameof(generatorState));
            Check.NotNull(connection, nameof(connection));

            var type = property.ClrType.UnwrapNullableType().UnwrapEnumType();

            if (type == typeof(long))
            {
                return new SqlServerSequenceHiLoValueGenerator<long>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(int))
            {
                return new SqlServerSequenceHiLoValueGenerator<int>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(short))
            {
                return new SqlServerSequenceHiLoValueGenerator<short>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(byte))
            {
                return new SqlServerSequenceHiLoValueGenerator<byte>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(char))
            {
                return new SqlServerSequenceHiLoValueGenerator<char>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(ulong))
            {
                return new SqlServerSequenceHiLoValueGenerator<ulong>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(uint))
            {
                return new SqlServerSequenceHiLoValueGenerator<uint>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(ushort))
            {
                return new SqlServerSequenceHiLoValueGenerator<ushort>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            if (type == typeof(sbyte))
            {
                return new SqlServerSequenceHiLoValueGenerator<sbyte>(_rawSqlCommandBuilder, _sqlGenerator, generatorState, connection);
            }

            throw new ArgumentException(CoreStrings.InvalidValueGeneratorFactoryProperty(
                nameof(SqlServerSequenceValueGeneratorFactory), property.Name, property.DeclaringEntityType.DisplayName()));
        }
Ejemplo n.º 12
0
 public SqlServerQueryContextFactory(
     [NotNull] IStateManager stateManager,
     [NotNull] IEntityKeyFactorySource entityKeyFactorySource,
     [NotNull] IClrCollectionAccessorSource collectionAccessorSource,
     [NotNull] IClrAccessorSource <IClrPropertySetter> propertySetterSource,
     [NotNull] ISqlServerConnection connection,
     [NotNull] ILoggerFactory loggerFactory)
     : base(stateManager, entityKeyFactorySource, collectionAccessorSource, propertySetterSource, connection, loggerFactory)
 {
 }
Ejemplo n.º 13
0
        /// <summary>
        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
        ///     any release. You should only use it directly in your code with extreme caution and knowing that
        ///     doing so can result in application failures when updating to a new Entity Framework Core release.
        /// </summary>
        public SqlServerCompiledQueryCacheKeyGenerator(
            CompiledQueryCacheKeyGeneratorDependencies dependencies,
            RelationalCompiledQueryCacheKeyGeneratorDependencies relationalDependencies,
            ISqlServerConnection sqlServerConnection)
            : base(dependencies, relationalDependencies)
        {
            Check.NotNull(sqlServerConnection, nameof(sqlServerConnection));

            _sqlServerConnection = sqlServerConnection;
        }
 public TestDatabaseCreator(
     ISqlServerConnection connection,
     IMigrationsModelDiffer modelDiffer,
     IMigrationsSqlGenerator sqlGenerator,
     IMigrationCommandExecutor migrationCommandExecutor,
     IModel model,
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     IExecutionStrategyFactory executionStrategyFactory)
     : base(connection, modelDiffer, sqlGenerator, migrationCommandExecutor, model, rawSqlCommandBuilder, executionStrategyFactory)
 {
 }
Ejemplo n.º 15
0
 public SqlServerDatabaseCreator(
     [NotNull] ISqlServerConnection connection,
     [NotNull] IMigrationsModelDiffer modelDiffer,
     [NotNull] IMigrationsSqlGenerator migrationsSqlGenerator,
     [NotNull] ISqlStatementExecutor statementExecutor,
     [NotNull] IModel model)
     : base(model, connection, modelDiffer, migrationsSqlGenerator, statementExecutor)
 {
     _connection             = connection;
     _migrationsSqlGenerator = migrationsSqlGenerator;
 }
 public SqlServerDatabaseCreator(
     [NotNull] ISqlServerConnection connection,
     [NotNull] IMigrationsModelDiffer modelDiffer,
     [NotNull] IMigrationsSqlGenerator migrationsSqlGenerator,
     [NotNull] ISqlStatementExecutor statementExecutor,
     [NotNull] IModel model)
     : base(model, connection, modelDiffer, migrationsSqlGenerator, statementExecutor)
 {
     _connection = connection;
     _migrationsSqlGenerator = migrationsSqlGenerator;
 }
Ejemplo n.º 17
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection)
            : base(dependencies)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection      = connection;
        }
Ejemplo n.º 18
0
        public SqlServerValueGeneratorSelector(
            [NotNull] ISqlServerValueGeneratorCache cache,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection)
            : base(cache)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection      = connection;
        }
Ejemplo n.º 19
0
 public SagaStore(ISqlServerConnection con, IDateTimeProvider dateTimeProvider, SqlServerOptions sqlServerOptions)
 {
     _con = con;
     _dateTimeProvider   = dateTimeProvider;
     _sqlServerOptions   = sqlServerOptions;
     _serializerSettings = new JsonSerializerSettings()
     {
         ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
         TypeNameHandling      = TypeNameHandling.All,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat
     };
 }
        /// <summary>
        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
        ///     any release. You should only use it directly in your code with extreme caution and knowing that
        ///     doing so can result in application failures when updating to a new Entity Framework Core release.
        /// </summary>
        public SqlServerQueryCompilationContextFactory(
            QueryCompilationContextDependencies dependencies,
            RelationalQueryCompilationContextDependencies relationalDependencies,
            ISqlServerConnection sqlServerConnection)
        {
            Check.NotNull(dependencies, nameof(dependencies));
            Check.NotNull(relationalDependencies, nameof(relationalDependencies));

            _dependencies           = dependencies;
            _relationalDependencies = relationalDependencies;
            _sqlServerConnection    = sqlServerConnection;
        }
        public SqlServerValueGeneratorSelector(
            [NotNull] ISqlServerValueGeneratorCache cache,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection)
            : base(cache)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection = connection;
        }
        public virtual ValueGenerator Create(
            [NotNull] IProperty property,
            [NotNull] SqlServerSequenceValueGeneratorState generatorState,
            [NotNull] ISqlServerConnection connection)
        {
            Check.NotNull(property, nameof(property));
            Check.NotNull(generatorState, nameof(generatorState));
            Check.NotNull(connection, nameof(connection));

            if (property.ClrType.UnwrapNullableType() == typeof(long))
            {
                return(new SqlServerSequenceValueGenerator <long>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(int))
            {
                return(new SqlServerSequenceValueGenerator <int>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(short))
            {
                return(new SqlServerSequenceValueGenerator <short>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(byte))
            {
                return(new SqlServerSequenceValueGenerator <byte>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(ulong))
            {
                return(new SqlServerSequenceValueGenerator <ulong>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(uint))
            {
                return(new SqlServerSequenceValueGenerator <uint>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(ushort))
            {
                return(new SqlServerSequenceValueGenerator <ushort>(_executor, generatorState, connection));
            }

            if (property.ClrType.UnwrapNullableType() == typeof(sbyte))
            {
                return(new SqlServerSequenceValueGenerator <sbyte>(_executor, generatorState, connection));
            }

            throw new ArgumentException(Internal.Strings.InvalidValueGeneratorFactoryProperty(
                                            nameof(SqlServerSequenceValueGeneratorFactory), property.Name, property.EntityType.DisplayName()));
        }
        public SqlServerValueGeneratorSelector(
            [NotNull] ISqlServerValueGeneratorCache cache,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalMetadataExtensionProvider relationalExtensions)
            : base(cache, relationalExtensions)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection      = connection;
        }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerValueGeneratorSelector(
     ValueGeneratorSelectorDependencies dependencies,
     ISqlServerSequenceValueGeneratorFactory sequenceFactory,
     ISqlServerConnection connection,
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     IRelationalCommandDiagnosticsLogger commandLogger)
     : base(dependencies)
 {
     _sequenceFactory      = sequenceFactory;
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _commandLogger        = commandLogger;
 }
Ejemplo n.º 25
0
 public SqlServerValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.Database.Command> commandLogger)
     : base(dependencies)
 {
     _sequenceFactory      = sequenceFactory;
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _commandLogger        = commandLogger;
 }
        public SqlServerValueGeneratorSelector(
            [NotNull] ISqlServerValueGeneratorCache cache,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRelationalAnnotationProvider relationalExtensions)
            : base(cache, relationalExtensions)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection = connection;
        }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerSequenceHiLoValueGenerator(
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     ISqlServerUpdateSqlGenerator sqlGenerator,
     SqlServerSequenceValueGeneratorState generatorState,
     ISqlServerConnection connection,
     IRelationalCommandDiagnosticsLogger commandLogger)
     : base(generatorState)
 {
     _sequence             = generatorState.Sequence;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _sqlGenerator         = sqlGenerator;
     _connection           = connection;
     _commandLogger        = commandLogger;
 }
Ejemplo n.º 28
0
        public SqlServerDatabaseCreator(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IMigrationsModelDiffer modelDiffer,
            [NotNull] IMigrationsSqlGenerator migrationsSqlGenerator,
            [NotNull] IModel model,
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder)
            : base(model, connection, modelDiffer, migrationsSqlGenerator)
        {
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));

            _connection             = connection;
            _migrationsSqlGenerator = migrationsSqlGenerator;
            _rawSqlCommandBuilder   = rawSqlCommandBuilder;
        }
Ejemplo n.º 29
0
        public SqlServerSequenceValueGenerator(
            [NotNull] SqlStatementExecutor executor,
            [NotNull] SqlServerSequenceValueGeneratorState generatorState,
            [NotNull] ISqlServerConnection connection)
            : base(generatorState)
        {
            Check.NotNull(executor, nameof(executor));
            Check.NotNull(generatorState, nameof(generatorState));
            Check.NotNull(connection, nameof(connection));

            _sequenceName = generatorState.SequenceName;
            _executor     = executor;
            _connection   = connection;
        }
Ejemplo n.º 30
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerSequenceHiLoValueGenerator(
     [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
     [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
     [NotNull] SqlServerSequenceValueGeneratorState generatorState,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.Database.Command> commandLogger)
     : base(generatorState)
 {
     _sequence             = generatorState.Sequence;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _sqlGenerator         = sqlGenerator;
     _connection           = connection;
     _commandLogger        = commandLogger;
 }
        public SqlServerDatabaseCreator(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IMigrationsModelDiffer modelDiffer,
            [NotNull] IMigrationsSqlGenerator migrationsSqlGenerator,
            [NotNull] IModel model,
            [NotNull] ISqlCommandBuilder sqlCommandBuilder)
            : base(model, connection, modelDiffer, migrationsSqlGenerator)
        {
            Check.NotNull(sqlCommandBuilder, nameof(sqlCommandBuilder));

            _connection = connection;
            _migrationsSqlGenerator = migrationsSqlGenerator;
            _sqlCommandBuilder = sqlCommandBuilder;
        }
Ejemplo n.º 32
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder)
            : base(dependencies)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));

            _sequenceFactory      = sequenceFactory;
            _connection           = connection;
            _rawSqlCommandBuilder = rawSqlCommandBuilder;
        }
        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;
        }
Ejemplo n.º 34
0
        public SqlServerHistoryRepository(
            [NotNull] ISqlServerConnection connection,
            [NotNull] ISqlServerDataStoreCreator 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 SqlServerDataStoreCreator(
            [NotNull] ISqlServerConnection connection,
            [NotNull] ISqlServerModelDiffer modelDiffer,
            [NotNull] ISqlServerMigrationSqlGenerator sqlGenerator,
            [NotNull] SqlStatementExecutor statementExecutor)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(modelDiffer, nameof(modelDiffer));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(statementExecutor, nameof(statementExecutor));

            _connection = connection;
            _modelDiffer = modelDiffer;
            _sqlGenerator = sqlGenerator;
            _statementExecutor = statementExecutor;
        }
Ejemplo n.º 36
0
        public SqlServerDataStoreCreator(
            [NotNull] ISqlServerConnection connection,
            [NotNull] IModelDiffer modelDiffer,
            [NotNull] IMigrationSqlGenerator sqlGenerator,
            [NotNull] ISqlStatementExecutor statementExecutor)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(modelDiffer, nameof(modelDiffer));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(statementExecutor, nameof(statementExecutor));

            _connection        = connection;
            _modelDiffer       = modelDiffer;
            _sqlGenerator      = sqlGenerator;
            _statementExecutor = statementExecutor;
        }
Ejemplo n.º 37
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerSequenceHiLoValueGenerator(
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
            [NotNull] ISqlServerUpdateSqlGenerator sqlGenerator,
            [NotNull] SqlServerSequenceValueGeneratorState generatorState,
            [NotNull] ISqlServerConnection connection)
            : base(generatorState)
        {
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));
            Check.NotNull(sqlGenerator, nameof(sqlGenerator));
            Check.NotNull(connection, nameof(connection));

            _sequence             = generatorState.Sequence;
            _rawSqlCommandBuilder = rawSqlCommandBuilder;
            _sqlGenerator         = sqlGenerator;
            _connection           = connection;
        }
        public SqlServerDatabaseFactory(
            [NotNull] DbContext context,
            [NotNull] ISqlServerDataStoreCreator dataStoreCreator,
            [NotNull] ISqlServerConnection connection,
            [NotNull] Migrator 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 TestDatabaseCreator(
     ISqlServerConnection connection,
     IMigrationsModelDiffer modelDiffer,
     IMigrationsSqlGenerator sqlGenerator,
     ISqlStatementExecutor statementExecutor,
     IModel model)
     : base(connection, modelDiffer, sqlGenerator, statementExecutor, model)
 {
 }
 public TestDatabaseCreator(
     ISqlServerConnection connection,
     IMigrationsModelDiffer modelDiffer,
     IMigrationsSqlGenerator sqlGenerator,
     IModel model,
     IRawSqlCommandBuilder rawSqlCommandBuilder)
     : base(connection, modelDiffer, sqlGenerator, model, rawSqlCommandBuilder)
 {
 }