共用方式為


DbExpressionBuilder.IsOfOnly(DbExpression, TypeUsage) 方法

定義

建立新的 DbIsOfExpression 運算式,這個運算式會判斷給定的引數是否為指定型別並且就只為該型別 (而非子型別)。

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

參數

argument
DbExpression

指定執行個體的運算式。

type
TypeUsage

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

傳回

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

例外狀況

引數或類型為 Null。

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

適用於