Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MetadataWorkspace.RegisterItemCollection Method

Registers the item collection with each associated data model.

This API is not CLS-compliant. 

Namespace:  System.Data.Metadata.Edm
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public void RegisterItemCollection(
	ItemCollection collection


Type: System.Data.Metadata.Edm.ItemCollection
The output parameter collection that needs to be filled up.


The collection argument is null.


The specified data model has already a registered an item collection.

The RegisterItemCollection method ensures that only a single item collection is registered for a given data model. If the specified data model has already a registered an item collection, an InvalidOperationException exception is thrown. For more information, see Advanced Metadata Workspace.


You cannot register different versions of model and mapping files in the same ItemCollection. For information about model and mapping file versions, see EdmVersion.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2015 Microsoft