Interface IQueryExpressionInterceptor
- Namespace
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly
- Microsoft.EntityFrameworkCore.dll
Allows interception of query expression trees and resulting compiled delegates.
public interface IQueryExpressionInterceptor : IInterceptor
Remarks
Use AddInterceptors(params IInterceptor[]) to register application interceptors.
Extensions can also register interceptors in the internal service provider. If both injected and application interceptors are found, then the injected interceptors are run in the order that they are resolved from the service provider, and then the application interceptors are run last.
See EF Core interceptors for more information and examples.
Methods
QueryCompilationStarting(Expression, QueryExpressionEventData)
Called with the LINQ expression tree for a query before it is compiled.
Expression QueryCompilationStarting(Expression queryExpression, QueryExpressionEventData eventData)
Parameters
queryExpression
ExpressionThe query expression.
eventData
QueryExpressionEventDataContextual information about the query environment.
Returns
- Expression
The query expression tree to continue with, which may have been changed by the interceptor.