Class QueryCompilationContextDependencies
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.dll
Service dependencies parameter class for QueryCompilationContext
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public sealed record QueryCompilationContextDependencies : IEquatable<QueryCompilationContextDependencies>
- Inheritance
-
QueryCompilationContextDependencies
- 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 C# 'with' operator. Do not call the constructor at any point in this process.
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
QueryCompilationContextDependencies(IModel, IQueryTranslationPreprocessorFactory, IQueryableMethodTranslatingExpressionVisitorFactory, IQueryTranslationPostprocessorFactory, IShapedQueryCompilingExpressionVisitorFactory, IExecutionStrategy, ICurrentDbContext, IDbContextOptions, IDiagnosticsLogger<Query>, IInterceptors)
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.
[EntityFrameworkInternal]
public QueryCompilationContextDependencies(IModel model, IQueryTranslationPreprocessorFactory queryTranslationPreprocessorFactory, IQueryableMethodTranslatingExpressionVisitorFactory queryableMethodTranslatingExpressionVisitorFactory, IQueryTranslationPostprocessorFactory queryTranslationPostprocessorFactory, IShapedQueryCompilingExpressionVisitorFactory shapedQueryCompilingExpressionVisitorFactory, IExecutionStrategy executionStrategy, ICurrentDbContext currentContext, IDbContextOptions contextOptions, IDiagnosticsLogger<DbLoggerCategory.Query> logger, IInterceptors interceptors)
Parameters
model
IModelqueryTranslationPreprocessorFactory
IQueryTranslationPreprocessorFactoryqueryableMethodTranslatingExpressionVisitorFactory
IQueryableMethodTranslatingExpressionVisitorFactoryqueryTranslationPostprocessorFactory
IQueryTranslationPostprocessorFactoryshapedQueryCompilingExpressionVisitorFactory
IShapedQueryCompilingExpressionVisitorFactoryexecutionStrategy
IExecutionStrategycurrentContext
ICurrentDbContextcontextOptions
IDbContextOptionslogger
IDiagnosticsLogger<DbLoggerCategory.Query>interceptors
IInterceptors
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 C# 'with' operator. Do not call the constructor at any point in this process.
Properties
Context
The current context.
public DbContext Context { get; }
Property Value
ContextOptions
The context options.
public IDbContextOptions ContextOptions { get; init; }
Property Value
ContextType
The CLR type of DbContext.
public Type ContextType { get; }
Property Value
Interceptors
Registered interceptors.
public IInterceptors Interceptors { get; }
Property Value
IsRetryingExecutionStrategy
Whether the configured execution strategy can retry.
public bool IsRetryingExecutionStrategy { get; init; }
Property Value
Logger
The logger.
public IDiagnosticsLogger<DbLoggerCategory.Query> Logger { get; init; }
Property Value
Model
The model.
public IModel Model { get; init; }
Property Value
QueryTrackingBehavior
The default query tracking behavior.
public QueryTrackingBehavior QueryTrackingBehavior { get; }
Property Value
QueryTranslationPostprocessorFactory
The shaped-query optimizer factory
public IQueryTranslationPostprocessorFactory QueryTranslationPostprocessorFactory { get; init; }
Property Value
QueryTranslationPreprocessorFactory
The query optimizer factory.
public IQueryTranslationPreprocessorFactory QueryTranslationPreprocessorFactory { get; init; }
Property Value
QueryableMethodTranslatingExpressionVisitorFactory
The queryable method-translating expression visitor factory.
public IQueryableMethodTranslatingExpressionVisitorFactory QueryableMethodTranslatingExpressionVisitorFactory { get; init; }
Property Value
ShapedQueryCompilingExpressionVisitorFactory
The shaped-query compiling expression visitor factory.
public IShapedQueryCompilingExpressionVisitorFactory ShapedQueryCompilingExpressionVisitorFactory { get; init; }
Property Value
Methods
Equals(QueryCompilationContextDependencies?)
public bool Equals(QueryCompilationContextDependencies? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
<Clone>$()
public QueryCompilationContextDependencies <Clone>$()
Returns
Operators
operator ==(QueryCompilationContextDependencies?, QueryCompilationContextDependencies?)
public static bool operator ==(QueryCompilationContextDependencies? left, QueryCompilationContextDependencies? right)
Parameters
Returns
operator !=(QueryCompilationContextDependencies?, QueryCompilationContextDependencies?)
public static bool operator !=(QueryCompilationContextDependencies? left, QueryCompilationContextDependencies? right)