Partager via


ProjectionExpression Class

Definition

An expression that represents a projection in SelectExpression.

public class ProjectionExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
public sealed class ProjectionExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
[System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")]
public sealed class ProjectionExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression
[System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")]
public sealed class ProjectionExpression : System.Linq.Expressions.Expression, Microsoft.EntityFrameworkCore.Query.IPrintableExpression, Microsoft.EntityFrameworkCore.Query.IRelationalQuotableExpression
type ProjectionExpression = class
    inherit Expression
    interface IPrintableExpression
[<System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")>]
type ProjectionExpression = class
    inherit Expression
    interface IPrintableExpression
[<System.Diagnostics.DebuggerDisplay("{Microsoft.EntityFrameworkCore.Query.ExpressionPrinter.Print(this), nq}")>]
type ProjectionExpression = class
    inherit Expression
    interface IRelationalQuotableExpression
    interface IPrintableExpression
Public Class ProjectionExpression
Inherits Expression
Implements IPrintableExpression
Public NotInheritable Class ProjectionExpression
Inherits Expression
Implements IPrintableExpression
Public NotInheritable Class ProjectionExpression
Inherits Expression
Implements IPrintableExpression, IRelationalQuotableExpression
Inheritance
ProjectionExpression
Attributes
Implements

Remarks

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 github.com/dotnet/efcore.

Constructors

ProjectionExpression(SqlExpression, String)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Alias

The alias assigned to this projection, if any.

Expression

The SQL value which is being projected.

NodeType

Gets the node type of this Expression.

Type

Gets the static type of the expression that this Expression represents.

Methods

Equals(Object) System.Linq.Expressions.Expression.Equals(System.Object)
GetHashCode() System.Linq.Expressions.Expression.GetHashCode
Print(ExpressionPrinter)
Quote()

Quotes the expression; that is, returns an expression that, when evaluated, would construct an expression identical to this one. Used to generate code for precompiled queries, which reconstructs this expression.

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.

VisitChildren(ExpressionVisitor)

Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.

Explicit Interface Implementations

IPrintableExpression.Print(ExpressionPrinter)

Creates a printable string representation of the given expression using ExpressionPrinter.

Applies to