SqlExpressionFactory.Constant Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Constant(Object, Type, RelationalTypeMapping) |
Creates a new SqlConstantExpression which represents a constant in a SQL tree. |
Constant(Object, RelationalTypeMapping) |
Creates a new SqlConstantExpression which represents a constant in a SQL tree. |
Constant(Object, Type, RelationalTypeMapping)
Creates a new SqlConstantExpression which represents a constant in a SQL tree.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression Constant (object? value, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default);
abstract member Constant : obj * Type * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression
override this.Constant : obj * Type * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression
Public Overridable Function Constant (value As Object, type As Type, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlConstantExpression
Parameters
- value
- Object
A value.
- type
- Type
The type for the constant. Useful when value is null.
- typeMapping
- RelationalTypeMapping
The RelationalTypeMapping associated with the expression.
Returns
An expression representing a constant in a SQL tree.
Implements
Applies to
Constant(Object, RelationalTypeMapping)
Creates a new SqlConstantExpression which represents a constant in a SQL tree.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression Constant (object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = default);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression Constant (object? value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default);
abstract member Constant : obj * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression
override this.Constant : obj * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression
Public Overridable Function Constant (value As Object, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlConstantExpression
Parameters
- value
- Object
A value.
- typeMapping
- RelationalTypeMapping
The RelationalTypeMapping associated with the expression.
Returns
An expression representing a constant in a SQL tree.
Implements
Applies to
Entity Framework