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