Table of Contents

Class RelationalMethodCallTranslatorProvider

Namespace
Microsoft.EntityFrameworkCore.Query
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Provides translations for LINQ MethodCallExpression expressions by dispatching to multiple specialized method call translators.

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 class RelationalMethodCallTranslatorProvider : IMethodCallTranslatorProvider
Inheritance
RelationalMethodCallTranslatorProvider
Implements
Inherited Members

Constructors

RelationalMethodCallTranslatorProvider(RelationalMethodCallTranslatorProviderDependencies)

Creates a new instance of the RelationalMethodCallTranslatorProvider class.

public RelationalMethodCallTranslatorProvider(RelationalMethodCallTranslatorProviderDependencies dependencies)

Parameters

dependencies RelationalMethodCallTranslatorProviderDependencies

Parameter object containing dependencies for this class.

Methods

AddTranslators(IEnumerable<IMethodCallTranslator>)

Adds additional translators which will take priority over existing registered translators.

protected virtual void AddTranslators(IEnumerable<IMethodCallTranslator> translators)

Parameters

translators IEnumerable<IMethodCallTranslator>

Translators to add.

Translate(IModel, SqlExpression, MethodInfo, IReadOnlyList<SqlExpression>, IDiagnosticsLogger<Query>)

public virtual SqlExpression Translate(IModel model, SqlExpression instance, MethodInfo method, IReadOnlyList<SqlExpression> arguments, IDiagnosticsLogger<DbLoggerCategory.Query> logger)

Parameters

model IModel
instance SqlExpression
method MethodInfo
arguments IReadOnlyList<SqlExpression>
logger IDiagnosticsLogger<Query>

Returns

SqlExpression