IAggregateMethodCallTranslatorProvider.Translate Method

Definition

Translates a LINQ aggregate MethodCallExpression to a SQL equivalent.

public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? Translate (Microsoft.EntityFrameworkCore.Metadata.IModel model, System.Reflection.MethodInfo method, Microsoft.EntityFrameworkCore.Query.EnumerableExpression source, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> arguments, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Query> logger);
abstract member Translate : Microsoft.EntityFrameworkCore.Metadata.IModel * System.Reflection.MethodInfo * Microsoft.EntityFrameworkCore.Query.EnumerableExpression * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression> * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Query> -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
Public Function Translate (model As IModel, method As MethodInfo, source As EnumerableExpression, arguments As IReadOnlyList(Of SqlExpression), logger As IDiagnosticsLogger(Of DbLoggerCategory.Query)) As SqlExpression

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<DbLoggerCategory.Query>

The query logger to use.

Returns

A SQL translation of the MethodCallExpression.

Applies to