語言

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,包含指定的集合類型和一個空的 Arguments 清單。

例外狀況

collectionType 為 null。

collectionType 不是集合類型。

適用於