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
See Implementation of database providers and extensions and How EF Core queries work for more information and examples.
Constructors
NonQueryExpression(DeleteExpression)
Creates a new instance of the NonQueryExpression class with associated delete expression.
public NonQueryExpression(DeleteExpression deleteExpression)
Parameters
deleteExpressionDeleteExpressionThe 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
updateExpressionUpdateExpressionThe 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
expressionExpressionThe expression to affect rows on the server.
commandSourceCommandSourceThe 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
Expression
An expression representing the non-query operation to be run against server.
public virtual Expression Expression { get; }
Property Value
NodeType
public override sealed ExpressionType NodeType { get; }
Property Value
Type
public override Type Type { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
public virtual void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinterExpressionPrinter
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
expressionExpressionThe 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
visitorExpressionVisitor