DbExpressionBuilder.CastTo(DbExpression, TypeUsage) メソッド

定義

ポリモーフィック引数にキャスト操作を適用する新しい 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 です。

指定したキャストが有効ではありません。

適用対象