Class SqlUnaryExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents an unary 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 SqlUnaryExpression : SqlExpression, IPrintableExpression
- Inheritance
-
SqlUnaryExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
SqlUnaryExpression(ExpressionType, SqlExpression, Type, RelationalTypeMapping?)
Creates a new instance of the SqlUnaryExpression class.
public SqlUnaryExpression(ExpressionType operatorType, SqlExpression operand, Type type, RelationalTypeMapping? typeMapping)
Parameters
operatorTypeExpressionTypeThe operator to apply.
operandSqlExpressionAn expression on which operator is applied.
typeTypeThe Type of the expression.
typeMappingRelationalTypeMappingThe RelationalTypeMapping associated with the expression.
Properties
Operand
The operand of this SQL unary operation.
public virtual SqlExpression Operand { get; }
Property Value
OperatorType
The operator of this SQL unary operation.
public virtual ExpressionType OperatorType { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Print(ExpressionPrinter)
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinterExpressionPrinter
Update(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.
public virtual SqlUnaryExpression Update(SqlExpression operand)
Parameters
operandSqlExpressionThe Operand property of the result.
Returns
- SqlUnaryExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitorExpressionVisitor