语言

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。

类型与参数的结果类型不在同一类型层次结构中。

适用于