Table of Contents

Class DeleteExpression

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

An expression that represents a DELETE 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 sealed class DeleteExpression : Expression, IPrintableExpression
Inheritance
DeleteExpression
Implements
IPrintableExpression
Inherited Members

Constructors

DeleteExpression(TableExpression, SelectExpression)

Creates a new instance of the DeleteExpression class.

public DeleteExpression(TableExpression table, SelectExpression selectExpression)

Parameters

table TableExpression

A table on which the delete operation is being applied.

selectExpression SelectExpression

A select expression which is used to determine which rows to delete.

Properties

NodeType

public override ExpressionType NodeType { get; }

Property Value

ExpressionType

SelectExpression

The select expression which is used to determine which rows to delete.

public SelectExpression SelectExpression { get; }

Property Value

SelectExpression

Table

The table on which the delete operation is being applied.

public TableExpression Table { get; }

Property Value

TableExpression

Tags

The list of tags applied to this DeleteExpression.

public ISet<string> Tags { get; }

Property Value

ISet<string>

Type

public override Type Type { get; }

Property Value

Type

Methods

ApplyTags(ISet<string>)

Applies a given set of tags.

public DeleteExpression ApplyTags(ISet<string> tags)

Parameters

tags ISet<string>

A list of tags to apply.

Returns

DeleteExpression

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Print(ExpressionPrinter)

public 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 DeleteExpression Update(SelectExpression selectExpression)

Parameters

selectExpression SelectExpression

The SelectExpression property of the result.

Returns

DeleteExpression

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