Table of Contents

Interface IAggregateMethodCallTranslatorProvider

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

Provides translations for LINQ MethodCallExpression expressions which represents aggregate methods.

public interface IAggregateMethodCallTranslatorProvider

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, MethodInfo, EnumerableExpression, IReadOnlyList<SqlExpression>, IDiagnosticsLogger<Query>)

Translates a LINQ aggregate MethodCallExpression to a SQL equivalent.

SqlExpression? Translate(IModel model, MethodInfo method, EnumerableExpression source, IReadOnlyList<SqlExpression> arguments, IDiagnosticsLogger<DbLoggerCategory.Query> logger)

Parameters

model IModel

A model to use for translation.

method MethodInfo

The method info from Method.

source EnumerableExpression

The source on which the aggregate method is applied.

arguments IReadOnlyList<SqlExpression>

SQL representations of scalar Arguments.

logger IDiagnosticsLogger<Query>

The query logger to use.

Returns

SqlExpression

A SQL translation of the MethodCallExpression.