NewEmptyCollection Method

DbExpressionBuilder.NewEmptyCollection Method (TypeUsage)

.NET Framework (current version)
 

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

Namespace:   System.Data.Common.CommandTrees.ExpressionBuilder
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public static DbNewInstanceExpression NewEmptyCollection(
	this TypeUsage collectionType
)

Parameters

collectionType
Type: System.Data.Metadata.Edm.TypeUsage

The type metadata for the collection to create

Return Value

Type: System.Data.Common.CommandTrees.DbNewInstanceExpression

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

Exception Condition
ArgumentNullException

collectionType is null.

ArgumentException

collectionType is not a collection type.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft