Share via


ISqlExpressionFactory.Constant Method

Definition

Overloads

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.

Constant(Object, RelationalTypeMapping)

Creates a new SqlConstantExpression which represents a constant in a SQL tree.

public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression Constant (object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = default);
public 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
Public 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.

Applies to

Constant(Object, Type, RelationalTypeMapping)

Creates a new SqlConstantExpression which represents a constant in a SQL tree.

public 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
Public 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.

Applies to