Table of Contents

Class EnumerableExpression

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

An expression that represents an enumerable or group translated from chain over a grouping element.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class EnumerableExpression : Expression, IPrintableExpression
Inheritance
EnumerableExpression
Implements
IPrintableExpression
Inherited Members

Constructors

EnumerableExpression(Expression)

Creates a new instance of the EnumerableExpression class.

public EnumerableExpression(Expression selector)

Parameters

selector Expression

The underlying sql expression being enumerated.

Properties

IsDistinct

The value indicating if distinct operator is applied on the enumerable or not.

public virtual bool IsDistinct { get; }

Property Value

bool

NodeType

public override ExpressionType NodeType { get; }

Property Value

ExpressionType

Orderings

The list of orderings to be applied to the enumerable.

public virtual IReadOnlyList<OrderingExpression> Orderings { get; }

Property Value

IReadOnlyList<OrderingExpression>

Predicate

The value indicating any predicate applied on the enumerable.

public virtual SqlExpression? Predicate { get; }

Property Value

SqlExpression

Selector

The underlying expression being enumerated.

public virtual Expression Selector { get; }

Property Value

Expression

Type

public override Type Type { get; }

Property Value

Type

Methods

AppendOrdering(OrderingExpression)

Appends ordering to the existing orderings of the EnumerableExpression.

public virtual EnumerableExpression AppendOrdering(OrderingExpression orderingExpression)

Parameters

orderingExpression OrderingExpression

An ordering expression to use for ordering.

Returns

EnumerableExpression

The new expression with specified component updated.

ApplyDistinct()

Applies DISTINCT operator to the selector of the EnumerableExpression.

public virtual EnumerableExpression ApplyDistinct()

Returns

EnumerableExpression

The new expression with specified component updated.

ApplyOrdering(OrderingExpression)

Applies ordering to the EnumerableExpression. This overwrites any previous ordering specified.

public virtual EnumerableExpression ApplyOrdering(OrderingExpression orderingExpression)

Parameters

orderingExpression OrderingExpression

An ordering expression to use for ordering.

Returns

EnumerableExpression

The new expression with specified component updated.

ApplyPredicate(SqlExpression)

Applies filter predicate to the EnumerableExpression.

public virtual EnumerableExpression ApplyPredicate(SqlExpression sqlExpression)

Parameters

sqlExpression SqlExpression

An expression to use for filtering.

Returns

EnumerableExpression

The new expression with specified component updated.

ApplySelector(Expression)

Applies new selector to the EnumerableExpression.

public virtual EnumerableExpression ApplySelector(Expression expression)

Parameters

expression Expression

Returns

EnumerableExpression

The new expression with specified component updated.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Print(ExpressionPrinter)

public virtual void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

VisitChildren(ExpressionVisitor)

protected override Expression VisitChildren(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

Returns

Expression