SqlExpressionFactory.Convert 方法

定义

创建一个表示将 SQL 表达式强制转换为不同类型的新 SqlUnaryExpression

public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression Convert (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = default);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression Convert (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression operand, Type type, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping? typeMapping = default);
abstract member Convert : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Type * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression
override this.Convert : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression * Type * Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlUnaryExpression
Public Overridable Function Convert (operand As SqlExpression, type As Type, Optional typeMapping As RelationalTypeMapping = Nothing) As SqlUnaryExpression

参数

operand
SqlExpression

SqlExpression 强制转换的 。

type
Type

强制转换后的表达式的返回类型。

typeMapping
RelationalTypeMapping

用于转换的关系类型映射。

返回

表示 SQL 树中强制转换操作的表达式。

实现

适用于