Share via


ISqlExpressionFactory.Constant Method

Definition

Overloads

Constant(Object, RelationalTypeMapping)

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

Constant(Object, Type, RelationalTypeMapping)

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

Constant(Object, RelationalTypeMapping)

Source:
ISqlExpressionFactory.cs
Source:
ISqlExpressionFactory.cs
Source:
ISqlExpressionFactory.cs

Creates a new SqlExpression 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);
public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression Constant (object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default);
abstract member Constant : obj * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlConstantExpression
abstract member Constant : obj * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
Public Function Constant (value As Object, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlConstantExpression
Public Function Constant (value As Object, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlExpression

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)

Source:
ISqlExpressionFactory.cs
Source:
ISqlExpressionFactory.cs
Source:
ISqlExpressionFactory.cs

Creates a new SqlExpression 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);
public Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression 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
abstract member Constant : obj * Type * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression
Public Function Constant (value As Object, type As Type, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlConstantExpression
Public Function Constant (value As Object, type As Type, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlExpression

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