共用方式為


DbExpressionBuilder.IsOf(DbExpression, TypeUsage) 方法

定義

建立新的 DbIsOfExpression,這個運算式會判斷給定的引數是否為指定型別或子型別。

public static System.Data.Entity.Core.Common.CommandTrees.DbIsOfExpression IsOf(this System.Data.Entity.Core.Common.CommandTrees.DbExpression argument, System.Data.Entity.Core.Metadata.Edm.TypeUsage type);
static member IsOf : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.TypeUsage -> System.Data.Entity.Core.Common.CommandTrees.DbIsOfExpression
<Extension()>
Public Function IsOf (argument As DbExpression, type As TypeUsage) As DbIsOfExpression

參數

argument
DbExpression

指定執行個體的運算式。

type
TypeUsage

型別中繼資料,指定要與執行個體結果型別比較的型別。

傳回

含有指定之執行個體和型別以及 DbExpressionKind IsOf 的新 DbIsOfExpression。

例外狀況

引數或類型為 null。

type 不在與引數結果型別相同的型別階層中。

適用於