DbExpressionBuilder.IsOfOnly(DbExpression, TypeUsage) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新的 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
類型中繼資料,指定應與實例結果類型比較的類型。
傳回
一個新的 DbIsOfExpression,具有指定的實例和類型,以及 DbExpressionKind IsOfOnly。
例外狀況
參數或型別為空。
型別與結果型別的參數不在同一型態階層中。