Data Access has been discontinued. Please refer to this page for more information.

Obtaining the MetadataContainer Used by the Context

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

The MetadataContainer is a central runtime class that you can use to interact with the metadata in the context of an application. Telerik Data Access metadata model provides both the infrastructure and type hierarchy that are used to describe the domain model in Telerik Data Access. To get the metadata used by the context, use the OpenAccessContext.Metadata property.

using (EntitiesModel dbContext = new EntitiesModel())
   Telerik.OpenAccess.Metadata.MetadataContainer metadata = dbContext.Metadata;
Using dbContext As New EntitiesModel()
 Dim metadata As Telerik.OpenAccess.Metadata.MetadataContainer = dbContext.Metadata
End Using

For more information about the Telerik Data Access Metadata, please read here.