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
IRelationalDatabaseCreatorrawSqlCommandBuilder
IRawSqlCommandBuilderconnection
IRelationalConnectionoptions
IDbContextOptionsmodelDiffer
IMigrationsModelDiffermigrationsSqlGenerator
IMigrationsSqlGeneratorsqlGenerationHelper
ISqlGenerationHelperconventionSetBuilder
IConventionSetBuildermodelDependencies
ModelDependenciestypeMappingSource
IRelationalTypeMappingSourcecurrentContext
ICurrentDbContextmodelLogger
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
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
MigrationsSqlGenerator
The SQL generator for Migrations operations.
public IMigrationsSqlGenerator MigrationsSqlGenerator { get; }
Property Value
ModelDependencies
The model dependencies.
public ModelDependencies ModelDependencies { get; }
Property Value
- ModelDependencies
ModelDiffer
The model differ.
public IMigrationsModelDiffer ModelDiffer { get; }
Property Value
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
SqlGenerationHelper
Helpers for generating update SQL.
public ISqlGenerationHelper SqlGenerationHelper { get; }
Property Value
TypeMappingSource
The type mapper.
public IRelationalTypeMappingSource TypeMappingSource { get; }
Property Value
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
ICurrentDbContextThe 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
IDbContextOptionsA 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
ModelDependenciesThe 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
IConventionSetBuilderThe 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
IMigrationsModelDifferA 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
IMigrationsSqlGeneratorA 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
IRawSqlCommandBuilderA 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
IRelationalConnectionA 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
IRelationalDatabaseCreatorA 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
IRelationalTypeMappingSourceThe 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
ISqlGenerationHelperA replacement for the current dependency of this type.
Returns
- HistoryRepositoryDependencies
A new parameter object with the given service replaced.