Table of Contents

Class HistoryRepositoryDependencies

Namespace
Microsoft.EntityFrameworkCore.Migrations
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Service dependencies parameter class for HistoryRepository

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

public sealed class HistoryRepositoryDependencies
Inheritance
HistoryRepositoryDependencies
Inherited Members

Constructors

HistoryRepositoryDependencies(IRelationalDatabaseCreator, IRawSqlCommandBuilder, IRelationalConnection, IDbContextOptions, IMigrationsModelDiffer, IMigrationsSqlGenerator, ISqlGenerationHelper, IConventionSetBuilder, ModelDependencies, IRelationalTypeMappingSource, ICurrentDbContext, IDiagnosticsLogger<Model>, IDiagnosticsLogger<Command>)

Creates the service dependencies parameter object for a HistoryRepository.

Do not call this constructor directly from either provider or application code as it may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

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.

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.

public HistoryRepositoryDependencies(IRelationalDatabaseCreator databaseCreator, IRawSqlCommandBuilder rawSqlCommandBuilder, IRelationalConnection connection, IDbContextOptions options, IMigrationsModelDiffer modelDiffer, IMigrationsSqlGenerator migrationsSqlGenerator, ISqlGenerationHelper sqlGenerationHelper, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies, IRelationalTypeMappingSource typeMappingSource, ICurrentDbContext currentContext, IDiagnosticsLogger<DbLoggerCategory.Model> modelLogger, IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger)

Parameters

databaseCreator IRelationalDatabaseCreator
rawSqlCommandBuilder IRawSqlCommandBuilder
connection IRelationalConnection
options IDbContextOptions
modelDiffer IMigrationsModelDiffer
migrationsSqlGenerator IMigrationsSqlGenerator
sqlGenerationHelper ISqlGenerationHelper
conventionSetBuilder IConventionSetBuilder
modelDependencies ModelDependencies
typeMappingSource IRelationalTypeMappingSource
currentContext ICurrentDbContext
modelLogger IDiagnosticsLogger<Model>
commandLogger IDiagnosticsLogger<Command>

Properties

CommandLogger

The command logger

public IDiagnosticsLogger<DbLoggerCategory.Database.Command> CommandLogger { get; }

Property Value

IDiagnosticsLogger<Command>

Connection

The connection to the database.

public IRelationalConnection Connection { get; }

Property Value

IRelationalConnection

ConventionSetBuilder

The core convention set to use when creating the model.

public IConventionSetBuilder ConventionSetBuilder { get; }

Property Value

IConventionSetBuilder

CurrentContext

Contains the Microsoft.EntityFrameworkCore.DbContext currently in use.

public ICurrentDbContext CurrentContext { get; }

Property Value

ICurrentDbContext

DatabaseCreator

The database creator.

public IRelationalDatabaseCreator DatabaseCreator { get; }

Property Value

IRelationalDatabaseCreator

MigrationsSqlGenerator

The SQL generator for Migrations operations.

public IMigrationsSqlGenerator MigrationsSqlGenerator { get; }

Property Value

IMigrationsSqlGenerator

ModelDependencies

The model dependencies.

public ModelDependencies ModelDependencies { get; }

Property Value

ModelDependencies

ModelDiffer

The model differ.

public IMigrationsModelDiffer ModelDiffer { get; }

Property Value

IMigrationsModelDiffer

ModelLogger

The model logger

[Obsolete]
public IDiagnosticsLogger<DbLoggerCategory.Model> ModelLogger { get; }

Property Value

IDiagnosticsLogger<Model>

Options

Options for the current context instance.

public IDbContextOptions Options { get; }

Property Value

IDbContextOptions

RawSqlCommandBuilder

A command builder for building raw SQL commands.

public IRawSqlCommandBuilder RawSqlCommandBuilder { get; }

Property Value

IRawSqlCommandBuilder

SqlGenerationHelper

Helpers for generating update SQL.

public ISqlGenerationHelper SqlGenerationHelper { get; }

Property Value

ISqlGenerationHelper

TypeMappingSource

The type mapper.

public IRelationalTypeMappingSource TypeMappingSource { get; }

Property Value

IRelationalTypeMappingSource

Methods

With(IDiagnosticsLogger<Command>)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger)

Parameters

commandLogger IDiagnosticsLogger<Command>

The command logger.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IDiagnosticsLogger<Model>)

Clones this dependency parameter object with one service replaced.

[Obsolete]
public HistoryRepositoryDependencies With(IDiagnosticsLogger<DbLoggerCategory.Model> modelLogger)

Parameters

modelLogger IDiagnosticsLogger<Model>

The type mapper.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(ICurrentDbContext)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(ICurrentDbContext currentContext)

Parameters

currentContext ICurrentDbContext

The type mapper.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IDbContextOptions)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IDbContextOptions options)

Parameters

options IDbContextOptions

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(ModelDependencies)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(ModelDependencies modelDependencies)

Parameters

modelDependencies ModelDependencies

The core convention set to use when creating the model.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IConventionSetBuilder)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IConventionSetBuilder conventionSetBuilder)

Parameters

conventionSetBuilder IConventionSetBuilder

The core convention set to use when creating the model.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IMigrationsModelDiffer)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IMigrationsModelDiffer modelDiffer)

Parameters

modelDiffer IMigrationsModelDiffer

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IMigrationsSqlGenerator)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IMigrationsSqlGenerator migrationsSqlGenerator)

Parameters

migrationsSqlGenerator IMigrationsSqlGenerator

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IRawSqlCommandBuilder)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IRawSqlCommandBuilder rawSqlCommandBuilder)

Parameters

rawSqlCommandBuilder IRawSqlCommandBuilder

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IRelationalConnection)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IRelationalConnection connection)

Parameters

connection IRelationalConnection

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IRelationalDatabaseCreator)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IRelationalDatabaseCreator databaseCreator)

Parameters

databaseCreator IRelationalDatabaseCreator

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(IRelationalTypeMappingSource)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(IRelationalTypeMappingSource typeMappingSource)

Parameters

typeMappingSource IRelationalTypeMappingSource

The type mapper.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.

With(ISqlGenerationHelper)

Clones this dependency parameter object with one service replaced.

public HistoryRepositoryDependencies With(ISqlGenerationHelper sqlGenerationHelper)

Parameters

sqlGenerationHelper ISqlGenerationHelper

A replacement for the current dependency of this type.

Returns

HistoryRepositoryDependencies

A new parameter object with the given service replaced.