Interface IMethodCallTranslatorProvider
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides translations for LINQ MethodCallExpression expressions which represents scalar methods.
public interface IMethodCallTranslatorProvider
Remarks
The service lifetime is Scoped and multiple registrations are allowed. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own set of instances of this service. The implementations may depend on other services registered with any lifetime. The implementations do not need to be thread-safe.
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
modelIModelA model to use for translation.
instanceSqlExpressionA SQL representation of Object.
methodMethodInfoThe method info from Method.
argumentsIReadOnlyList<SqlExpression>SQL representations of Arguments.
loggerIDiagnosticsLogger<Query>The query logger to use.
Returns
- SqlExpression
A SQL translation of the MethodCallExpression.