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

定義

指定した型と一致する指定した入力セットの要素で構成されるセットを生成する新しい DbOfTypeExpression を作成します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbOfTypeExpression ^ OfType(System::Data::Common::CommandTrees::DbExpression ^ argument, System::Data::Metadata::Edm::TypeUsage ^ type);
public static System.Data.Common.CommandTrees.DbOfTypeExpression OfType (this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Metadata.Edm.TypeUsage type);
static member OfType : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.TypeUsage -> System.Data.Common.CommandTrees.DbOfTypeExpression
<Extension()>
Public Function OfType (argument As DbExpression, type As TypeUsage) As DbOfTypeExpression

パラメーター

argument
DbExpression

入力セットを指定する DbExpression

type
TypeUsage

入力セットの要素のうち結果のセットに含める要素の型メタデータ。

戻り値

指定されたセット引数と型、および ExpressionKind の OfType を持つ新しい DbOfTypeExpression。

例外

argument または type が null です。

argument の結果型がコレクション型でないか、type が属する型階層が、argument のコレクション型の結果型の要素の型が属する型階層と異なります。

注釈

DbOfTypeExpression には、ポリモーフィックな要素型を持つコレクションの結果型があり、そのtype要素型と同じ型階層の型である 必要argumentがあります。

適用対象