DbExpressionBuilder.OfTypeOnly(DbExpression, TypeUsage) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个新值,它生成一个 DbOfTypeExpression 集,该集由完全属于指定类型的给定输入集的元素组成。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbOfTypeExpression ^ OfTypeOnly(System::Data::Common::CommandTrees::DbExpression ^ argument, System::Data::Metadata::Edm::TypeUsage ^ type);
public static System.Data.Common.CommandTrees.DbOfTypeExpression OfTypeOnly(this System.Data.Common.CommandTrees.DbExpression argument, System.Data.Metadata.Edm.TypeUsage type);
static member OfTypeOnly : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.TypeUsage -> System.Data.Common.CommandTrees.DbOfTypeExpression
<Extension()>
Public Function OfTypeOnly (argument As DbExpression, type As TypeUsage) As DbOfTypeExpression
参数
- argument
- DbExpression
一个 DbExpression 指定输入集。
- type
- TypeUsage
输入集元素必须完全匹配才能包含在生成的集中的类型的类型元数据。
返回
具有指定集参数和类型的新的 DbOfTypeExpression,以及 ExpressionKind。OfTypeOnly
例外
argument 或 type 为 null。
argument 没有集合结果类型,也不是 type 与集合结果类型的元素类型相同的类型层次结构中的类型 argument。
注解
DbOfTypeExpression 要求 argument 具有具有多态元素类型的集合结果类型,并且 type 它是与该元素类型相同的类型层次结构中的类型。