CaseExpression Class

Definition

An expression that represents a CASE statement 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 CaseExpression : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
type CaseExpression = class
    inherit SqlExpression
Public Class CaseExpression
Inherits SqlExpression
Inheritance
CaseExpression

Constructors

CaseExpression(IReadOnlyList<CaseWhenClause>, SqlExpression)

Creates a new instance of the CaseExpression class which represents a searched CASE expression.

CaseExpression(SqlExpression, IReadOnlyList<CaseWhenClause>, SqlExpression)

Creates a new instance of the CaseExpression class which represents a simple CASE expression.

CaseExpression(SqlExpression, IReadOnlyList<CaseWhenClause>)

Properties

ElseResult

The value to return if none of the WhenClauses matches.

NodeType (Inherited from SqlExpression)
Operand

The value to compare in WhenClauses.

Type (Inherited from SqlExpression)
TypeMapping

The RelationalTypeMapping associated with this expression.

(Inherited from SqlExpression)
WhenClauses

The list of CaseWhenClause to match Operand or evaluate condition to get result.

Methods

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

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

Update(SqlExpression, IReadOnlyList<CaseWhenClause>, 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.

(Inherited from SqlExpression)

Applies to