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.

public sealed record HistoryRepositoryDependencies : IEquatable<HistoryRepositoryDependencies>
Inheritance
HistoryRepositoryDependencies
Implements
Inherited Members

Remarks

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.

Constructors

HistoryRepositoryDependencies(IRelationalDatabaseCreator, IRawSqlCommandBuilder, IRelationalConnection, IDbContextOptions, IMigrationsModelDiffer, IMigrationsSqlGenerator, ISqlGenerationHelper, IConventionSetBuilder, ModelDependencies, IRelationalTypeMappingSource, ICurrentDbContext, IModelRuntimeInitializer, IRelationalCommandDiagnosticsLogger)

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, IModelRuntimeInitializer modelRuntimeInitializer, IRelationalCommandDiagnosticsLogger commandLogger)

Parameters

databaseCreator IRelationalDatabaseCreator
rawSqlCommandBuilder IRawSqlCommandBuilder
connection IRelationalConnection
options IDbContextOptions
modelDiffer IMigrationsModelDiffer
migrationsSqlGenerator IMigrationsSqlGenerator
sqlGenerationHelper ISqlGenerationHelper
conventionSetBuilder IConventionSetBuilder
modelDependencies ModelDependencies
typeMappingSource IRelationalTypeMappingSource
currentContext ICurrentDbContext
modelRuntimeInitializer IModelRuntimeInitializer
commandLogger IRelationalCommandDiagnosticsLogger

Remarks

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.

Properties

CommandLogger

The command logger

public IRelationalCommandDiagnosticsLogger CommandLogger { get; init; }

Property Value

IRelationalCommandDiagnosticsLogger

Connection

The connection to the database.

public IRelationalConnection Connection { get; init; }

Property Value

IRelationalConnection

ConventionSetBuilder

The core convention set to use when creating the model.

public IConventionSetBuilder ConventionSetBuilder { get; init; }

Property Value

IConventionSetBuilder

CurrentContext

Contains the Microsoft.EntityFrameworkCore.DbContext currently in use.

public ICurrentDbContext CurrentContext { get; init; }

Property Value

ICurrentDbContext

DatabaseCreator

The database creator.

public IRelationalDatabaseCreator DatabaseCreator { get; init; }

Property Value

IRelationalDatabaseCreator

MigrationsSqlGenerator

The SQL generator for Migrations operations.

public IMigrationsSqlGenerator MigrationsSqlGenerator { get; init; }

Property Value

IMigrationsSqlGenerator

ModelDependencies

The model dependencies.

public ModelDependencies ModelDependencies { get; init; }

Property Value

ModelDependencies

ModelDiffer

The model differ.

public IMigrationsModelDiffer ModelDiffer { get; init; }

Property Value

IMigrationsModelDiffer

ModelRuntimeInitializer

The model runtime initializer

public IModelRuntimeInitializer ModelRuntimeInitializer { get; init; }

Property Value

IModelRuntimeInitializer

Options

Options for the current context instance.

public IDbContextOptions Options { get; init; }

Property Value

IDbContextOptions

RawSqlCommandBuilder

A command builder for building raw SQL commands.

public IRawSqlCommandBuilder RawSqlCommandBuilder { get; init; }

Property Value

IRawSqlCommandBuilder

SqlGenerationHelper

Helpers for generating update SQL.

public ISqlGenerationHelper SqlGenerationHelper { get; init; }

Property Value

ISqlGenerationHelper

TypeMappingSource

The type mapper.

public IRelationalTypeMappingSource TypeMappingSource { get; init; }

Property Value

IRelationalTypeMappingSource

Methods

Equals(HistoryRepositoryDependencies?)

public bool Equals(HistoryRepositoryDependencies? other)

Parameters

other HistoryRepositoryDependencies

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

<Clone>$()

public HistoryRepositoryDependencies <Clone>$()

Returns

HistoryRepositoryDependencies

Operators

operator ==(HistoryRepositoryDependencies?, HistoryRepositoryDependencies?)

public static bool operator ==(HistoryRepositoryDependencies? left, HistoryRepositoryDependencies? right)

Parameters

left HistoryRepositoryDependencies
right HistoryRepositoryDependencies

Returns

bool

operator !=(HistoryRepositoryDependencies?, HistoryRepositoryDependencies?)

public static bool operator !=(HistoryRepositoryDependencies? left, HistoryRepositoryDependencies? right)

Parameters

left HistoryRepositoryDependencies
right HistoryRepositoryDependencies

Returns

bool