Table of Contents

Class OrderingExpression

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

An expression that represents an ordering in a SQL tree.

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

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

Constructors

OrderingExpression(SqlExpression, bool)

Creates a new instance of the OrderingExpression class.

public OrderingExpression(SqlExpression expression, bool ascending)

Parameters

expression SqlExpression

An expression used for ordering.

ascending bool

A value indicating if the ordering is ascending.

Properties

Expression

The expression used for ordering.

public virtual SqlExpression Expression { get; }

Property Value

SqlExpression

IsAscending

The value indicating if the ordering is ascending.

public virtual bool IsAscending { get; }

Property Value

bool

NodeType

public override sealed ExpressionType NodeType { get; }

Property Value

ExpressionType

Type

public override Type Type { get; }

Property Value

Type

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Update(SqlExpression)

Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.

public virtual OrderingExpression Update(SqlExpression expression)

Parameters

expression SqlExpression

The Expression property of the result.

Returns

OrderingExpression

This expression if no children changed, or an expression with the updated children.

VisitChildren(ExpressionVisitor)

protected override Expression VisitChildren(ExpressionVisitor visitor)

Parameters

visitor ExpressionVisitor

Returns

Expression