共用方式為


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

要建立之集合的型別中繼資料

傳回

具有指定集合類型和空白 Arguments 清單的新 DbNewInstanceExpression。

例外狀況

collectionType 為 null。

collectionType 不是集合類型。

適用於