Class SqlBinaryExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents a binary 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 SqlBinaryExpression : SqlExpression, IPrintableExpression
- Inheritance
-
SqlBinaryExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
SqlBinaryExpression(ExpressionType, SqlExpression, SqlExpression, Type, RelationalTypeMapping)
Creates a new instance of the SqlBinaryExpression class.
public SqlBinaryExpression(ExpressionType operatorType, SqlExpression left, SqlExpression right, Type type, RelationalTypeMapping typeMapping)
Parameters
operatorTypeExpressionTypeThe operator to apply.
leftSqlExpressionAn expression which is left operand.
rightSqlExpressionAn expression which is right operand.
typeTypeThe Type of the expression.
typeMappingRelationalTypeMappingThe RelationalTypeMapping associated with the expression.
Properties
Left
The left operand.
public virtual SqlExpression Left { get; }
Property Value
OperatorType
The operator of this SQL binary operation.
public virtual ExpressionType OperatorType { get; }
Property Value
Right
The right operand.
public virtual SqlExpression Right { 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, 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 SqlBinaryExpression Update(SqlExpression left, SqlExpression right)
Parameters
leftSqlExpressionThe Left property of the result.
rightSqlExpressionThe Right property of the result.
Returns
- SqlBinaryExpression
This expression if no children changed, or an expression with the updated children.
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitorExpressionVisitor