DbExpressionBuilder.CastTo(DbExpression, TypeUsage) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个将强制转换操作应用于多态参数的新 DbCastExpression 参数。
public static System.Data.Entity.Core.Common.CommandTrees.DbCastExpression CastTo(this System.Data.Entity.Core.Common.CommandTrees.DbExpression argument, System.Data.Entity.Core.Metadata.Edm.TypeUsage toType);
static member CastTo : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.TypeUsage -> System.Data.Entity.Core.Common.CommandTrees.DbCastExpression
<Extension()>
Public Function CastTo (argument As DbExpression, toType As TypeUsage) As DbCastExpression
参数
- argument
- DbExpression
应向其应用强制转换的参数。
- toType
- TypeUsage
指定要强制转换为的类型的类型元数据。
返回
具有指定参数和目标类型的新 DbCastExpression。
例外
参数或 toType 为 null。
指定的强制转换无效。