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 与参数的结果类型不在同一类型层次结构中。

适用于