Class SqlConstantExpression
- Namespace
- Microsoft.EntityFrameworkCore.Query.SqlExpressions
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
An expression that represents a constant 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 SqlConstantExpression : SqlExpression, IPrintableExpression
- Inheritance
-
SqlConstantExpression
- Implements
-
IPrintableExpression
- Inherited Members
Constructors
SqlConstantExpression(ConstantExpression, RelationalTypeMapping)
Creates a new instance of the SqlConstantExpression class.
public SqlConstantExpression(ConstantExpression constantExpression, RelationalTypeMapping typeMapping)
Parameters
constantExpressionConstantExpressiontypeMappingRelationalTypeMappingThe RelationalTypeMapping associated with the expression.
Properties
Value
The constant value.
public virtual object Value { get; }
Property Value
Methods
ApplyTypeMapping(RelationalTypeMapping)
Applies supplied type mapping to this expression.
public virtual SqlExpression ApplyTypeMapping(RelationalTypeMapping typeMapping)
Parameters
typeMappingRelationalTypeMappingA relational type mapping to apply.
Returns
- SqlExpression
A new expression which has supplied type mapping.
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
VisitChildren(ExpressionVisitor)
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitorExpressionVisitor