Table of Contents

Class ProjectionExpression

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

An expression that represents a projection in SelectExpression.

This is a simple wrapper around a SqlExpression and an alias. Instances of this type cannot be constructed by application or database provider code. If this is a problem for your application or provider, then please file an issue at https://github.com/dotnet/efcore.

public sealed class ProjectionExpression : Expression, IPrintableExpression
Inheritance
ProjectionExpression
Implements
IPrintableExpression
Inherited Members

Properties

Alias

The alias assigned to this projection, if any.

public string Alias { get; }

Property Value

string

Expression

The SQL value which is being projected.

public SqlExpression Expression { get; }

Property Value

SqlExpression

NodeType

public override 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 ProjectionExpression Update(SqlExpression expression)

Parameters

expression SqlExpression

The Expression property of the result.

Returns

ProjectionExpression

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