Table of Contents

Class NonQueryExpression

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

An expression that contains a non-query expression. The result of a non-query expression is typically the number of rows affected.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class NonQueryExpression : Expression, IPrintableExpression
Inheritance
NonQueryExpression
Implements
IPrintableExpression
Inherited Members

Remarks

Constructors

NonQueryExpression(DeleteExpression)

Creates a new instance of the NonQueryExpression class with associated delete expression.

public NonQueryExpression(DeleteExpression deleteExpression)

Parameters

deleteExpression DeleteExpression

The delete expression to delete rows on the server.

NonQueryExpression(UpdateExpression)

Creates a new instance of the NonQueryExpression class with associated update expression.

public NonQueryExpression(UpdateExpression updateExpression)

Parameters

updateExpression UpdateExpression

The update expression to update rows on the server.

NonQueryExpression(Expression, CommandSource)

Creates a new instance of the NonQueryExpression class with associated query expression and command source.

public NonQueryExpression(Expression expression, CommandSource commandSource)

Parameters

expression Expression

The expression to affect rows on the server.

commandSource CommandSource

The command source to use for this non-query operation.

Properties

CommandSource

The command source to use for this non-query operation.

public virtual CommandSource CommandSource { get; }

Property Value

CommandSource

Expression

An expression representing the non-query operation to be run against server.

public virtual Expression Expression { get; }

Property Value

Expression

NodeType

public override sealed 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

Print(ExpressionPrinter)

public virtual void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

Update(Expression)

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 NonQueryExpression Update(Expression expression)

Parameters

expression Expression

The Expression property of the result.

Returns

NonQueryExpression

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