Share via


DbExpressionBuilder.NewEmptyCollection(TypeUsage) Method

Definition

Creates a new DbNewInstanceExpression that constructs an empty collection of the specified collection type.

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

Parameters

collectionType
TypeUsage

The type metadata for the collection to create

Returns

A new DbNewInstanceExpression with the specified collection type and an empty Arguments list.

Exceptions

collectionType is null.

collectionType is not a collection type.

Applies to