Table of Contents

Class DbContextDependencies

Namespace
Microsoft.EntityFrameworkCore.Internal
Assembly
Microsoft.EntityFrameworkCore.dll

Service dependencies parameter class for DbContext

public sealed record DbContextDependencies : IDbContextDependencies, IEquatable<DbContextDependencies>
Inheritance
DbContextDependencies
Implements
Inherited Members
Extension Methods

Remarks

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.

The service lifetime is Scoped. This means that each 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

DbContextDependencies(ICurrentDbContext, IChangeDetector, IDbSetSource, IEntityFinderSource, IEntityGraphAttacher, IAsyncQueryProvider, IStateManager, IExceptionDetector, IDiagnosticsLogger<Update>, IDiagnosticsLogger<Infrastructure>)

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 DbContextDependencies(ICurrentDbContext currentContext, IChangeDetector changeDetector, IDbSetSource setSource, IEntityFinderSource entityFinderSource, IEntityGraphAttacher entityGraphAttacher, IAsyncQueryProvider queryProvider, IStateManager stateManager, IExceptionDetector exceptionDetector, IDiagnosticsLogger<DbLoggerCategory.Update> updateLogger, IDiagnosticsLogger<DbLoggerCategory.Infrastructure> infrastructureLogger)

Parameters

currentContext ICurrentDbContext
changeDetector IChangeDetector
setSource IDbSetSource
entityFinderSource IEntityFinderSource
entityGraphAttacher IEntityGraphAttacher
queryProvider IAsyncQueryProvider
stateManager IStateManager
exceptionDetector IExceptionDetector
updateLogger IDiagnosticsLogger<DbLoggerCategory.Update>
infrastructureLogger IDiagnosticsLogger<DbLoggerCategory.Infrastructure>

Properties

ChangeDetector

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 IChangeDetector ChangeDetector { get; }

Property Value

IChangeDetector

EntityFinderFactory

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 IEntityFinderFactory EntityFinderFactory { get; }

Property Value

IEntityFinderFactory

EntityGraphAttacher

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 IEntityGraphAttacher EntityGraphAttacher { get; }

Property Value

IEntityGraphAttacher

ExceptionDetector

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 IExceptionDetector ExceptionDetector { get; }

Property Value

IExceptionDetector

InfrastructureLogger

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 IDiagnosticsLogger<DbLoggerCategory.Infrastructure> InfrastructureLogger { get; }

Property Value

IDiagnosticsLogger<DbLoggerCategory.Infrastructure>

QueryProvider

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 IAsyncQueryProvider QueryProvider { get; }

Property Value

IAsyncQueryProvider

SetSource

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 IDbSetSource SetSource { get; }

Property Value

IDbSetSource

StateManager

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 IStateManager StateManager { get; }

Property Value

IStateManager

UpdateLogger

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 IDiagnosticsLogger<DbLoggerCategory.Update> UpdateLogger { get; }

Property Value

IDiagnosticsLogger<DbLoggerCategory.Update>

Methods

Equals(DbContextDependencies?)

public bool Equals(DbContextDependencies? other)

Parameters

other DbContextDependencies

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 DbContextDependencies <Clone>$()

Returns

DbContextDependencies

Operators

operator ==(DbContextDependencies?, DbContextDependencies?)

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

Parameters

left DbContextDependencies
right DbContextDependencies

Returns

bool

operator !=(DbContextDependencies?, DbContextDependencies?)

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

Parameters

left DbContextDependencies
right DbContextDependencies

Returns

bool