Table of Contents

Class ExistsExpression

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

An expression that represents an EXISTS operation 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 ExistsExpression : SqlExpression, IPrintableExpression
Inheritance
ExistsExpression
Implements
IPrintableExpression
Inherited Members

Constructors

ExistsExpression(SelectExpression, bool, RelationalTypeMapping)

Creates a new instance of the ExistsExpression class.

public ExistsExpression(SelectExpression subquery, bool negated, RelationalTypeMapping typeMapping)

Parameters

subquery SelectExpression

A subquery to check existence of.

negated bool

A value indicating if the existence check is negated.

typeMapping RelationalTypeMapping

The RelationalTypeMapping associated with the expression.

Properties

IsNegated

The value indicating if the existence check is negated.

public virtual bool IsNegated { get; }

Property Value

bool

Subquery

The subquery to check existence of.

public virtual SelectExpression Subquery { get; }

Property Value

SelectExpression

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Print(ExpressionPrinter)

protected override void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

Update(SelectExpression)

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 ExistsExpression Update(SelectExpression subquery)

Parameters

subquery SelectExpression

The Subquery property of the result.

Returns

ExistsExpression

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