Share via


RelationalSqlTranslatingExpressionVisitor.TranslateCount Method

Definition

Overloads

TranslateCount(Expression)
TranslateCount(SqlExpression)
Obsolete.

Translates Count over an expression to an equivalent SQL representation.

TranslateCount(Expression)

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression TranslateCount (System.Linq.Expressions.Expression expression = default);
abstract member TranslateCount : System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
override this.TranslateCount : System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
Public Overridable Function TranslateCount (Optional expression As Expression = Nothing) As SqlExpression

Parameters

expression
Expression

Returns

Applies to

TranslateCount(SqlExpression)

Caution

Use IAggregateMethodCallTranslatorProvider to add translation for aggregate methods

Translates Count over an expression to an equivalent SQL representation.

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression TranslateCount (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression sqlExpression);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? TranslateCount (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression sqlExpression);
[System.Obsolete("Use IAggregateMethodCallTranslatorProvider to add translation for aggregate methods")]
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? TranslateCount (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression sqlExpression);
abstract member TranslateCount : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
override this.TranslateCount : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
[<System.Obsolete("Use IAggregateMethodCallTranslatorProvider to add translation for aggregate methods")>]
abstract member TranslateCount : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
override this.TranslateCount : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
Public Overridable Function TranslateCount (sqlExpression As SqlExpression) As SqlExpression

Parameters

sqlExpression
SqlExpression

An expression to translate Count over.

Returns

A SQL translation of Count over the given expression.

Attributes

Applies to