Share via


IAggregateMethodCallTranslator.Translate Method

Definition

Translates a LINQ MethodCallExpression to a SQL equivalent.

public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? Translate (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 : 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 (method As MethodInfo, source As EnumerableExpression, arguments As IReadOnlyList(Of SqlExpression), logger As IDiagnosticsLogger(Of DbLoggerCategory.Query)) As SqlExpression

Parameters

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