QueryContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The principal data structure used by a compiled query during execution.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class QueryContext
public class QueryContext : IDisposable, Microsoft.EntityFrameworkCore.Query.Internal.IParameterValues
public abstract class QueryContext : Microsoft.EntityFrameworkCore.Query.IParameterValues
public abstract class QueryContext : Microsoft.EntityFrameworkCore.Query.Internal.IParameterValues
type QueryContext = class
type QueryContext = class
interface IDisposable
interface IParameterValues
type QueryContext = class
interface IParameterValues
Public Class QueryContext
Public Class QueryContext
Implements IDisposable, IParameterValues
Public MustInherit Class QueryContext
Implements IParameterValues
- Inheritance
-
QueryContext
- Derived
- Implements
Remarks
See Implementation of database providers and extensions and How EF Core queries work for more information and examples.
Constructors
QueryContext(Func<IQueryBuffer>, IStateManager, IConcurrencyDetector) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
QueryContext(Func<IQueryBuffer>, LazyRef<IStateManager>, IConcurrencyDetector) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
QueryContext(QueryContextDependencies, Func<IQueryBuffer>) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
QueryContext(QueryContextDependencies) |
Creates a new QueryContext instance. This type is typically used by database providers (and other extensions). It is generally not used in application code. |
Properties
CancellationToken |
The cancellation token to use while executing the query. |
CommandLogger |
The command logger to use while executing the query. |
ConcurrencyDetector |
The concurrency detector to use while executing the query. |
Context |
The current DbContext in using while executing the query. |
Dependencies |
Dependencies for this service. |
ExceptionDetector |
The exception detector to use while executing the query. |
ExecutionStrategy |
The execution strategy to use while executing the query. |
ExecutionStrategyFactory |
Obsolete.
The execution strategy factory to use while executing the query. |
ParameterValues |
The parameter values to use while executing the query. |
QueryBuffer |
The query buffer. |
QueryLogger |
The query logger to use while executing the query. |
QueryProvider |
Obsolete.
The query provider. |
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. |
Methods
AddParameter(String, Object) |
Adds a parameter to ParameterValues for this query. |
BeginTrackingQuery() |
Notify the state manager that a tracking query is starting. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
InitializeStateManager(Boolean) |
Initializes the Microsoft.EntityFrameworkCore.ChangeTracking.Internal.IStateManager to be used with this QueryContext. |
RemoveParameter(String) |
Removes a parameter by name. |
SetNavigationIsLoaded(Object, INavigation) |
Sets the navigation as loaded. |
SetNavigationIsLoaded(Object, INavigationBase) |
Sets the navigation for given entity as loaded. |
SetParameter(String, Object) |
Sets a parameter value. |
StartTracking(IEntityType, Object, ValueBuffer) |
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. |
StartTracking(Object, EntityTrackingInfo) |
Start tracking an entity. |
TryGetEntry(IKey, Object[], Boolean, Boolean) |
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. |
Applies to
Entity Framework