DbExpressionBuilder.NewEmptyCollection(TypeUsage) 方法

定义

创建一个新的 DbNewInstanceExpression,它构造一个指定集合类型的空集合。

public static System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression NewEmptyCollection(this System.Data.Entity.Core.Metadata.Edm.TypeUsage collectionType);
static member NewEmptyCollection : System.Data.Entity.Core.Metadata.Edm.TypeUsage -> System.Data.Entity.Core.Common.CommandTrees.DbNewInstanceExpression
<Extension()>
Public Function NewEmptyCollection (collectionType As TypeUsage) As DbNewInstanceExpression

参数

collectionType
TypeUsage

要创建的集合的类型元数据

返回

具有指定集合类型和空参数列表的新 DbNewInstanceExpression。

例外

collectionType 为 null。

collectionType 不是集合类型。

适用于