Interface IMethodCallTranslatorProvider
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides translations for LINQ MethodCallExpression expressions.
The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.
public interface IMethodCallTranslatorProvider
Methods
Translate(IModel, SqlExpression, MethodInfo, IReadOnlyList<SqlExpression>, IDiagnosticsLogger<Query>)
Translates a LINQ MethodCallExpression to a SQL equivalent.
SqlExpression Translate(IModel model, SqlExpression instance, MethodInfo method, IReadOnlyList<SqlExpression> arguments, IDiagnosticsLogger<DbLoggerCategory.Query> logger)
Parameters
model
IModelA model to use for translation.
instance
SqlExpressionA SQL representation of Object.
method
MethodInfoThe method info from Method.
arguments
IReadOnlyList<SqlExpression>SQL representations of Arguments.
logger
IDiagnosticsLogger<Query>The query logger to use.
Returns
- SqlExpression
A SQL translation of the MethodCallExpression.