Udostępnij za pośrednictwem


Metadata Type Hierarchy Overview

The ADO.NET metadata type hierarchy provides a set of .NET Framework types to represent the same concepts defined in the Entity Data Model (EDM) in the Entity Framework. For more information about the Entity Framework and the EDM, see ADO.NET Entity Framework and Entity Data Model.

There are three fundamental concepts in the metadata type hierarchy: types, members, and relationships. Types are the top-level constructs that form the basis of an EDM. In the EDM, types can be simple or structural. Members define the content of structural types. Relationships provide logical connections between the entity types that are derived from structural types.

ADO.NET provides the System.Data.Metadata.Edm namespace to manage metadata services for the Entity Framework. The following diagram illustrates the type hierarchy supported by the System.Data.Metadata.Edm namespace.

ADO.NET Metadata Type Hierarchy

The top-level class is a MetadataItem, which is the base class for all classes in the ADO.NET metadata type hierarchy. An EdmType class is the base class for the classes that represent types in the EDM. A StructuralType is a base type for all the types in the metadata type hierarchy that have members. For more information about the types in the metadata type hierarchy, see Types (Metadata). The code sample in the GlobalItem class demonstrates browsing the types in the metadata type hierarchy. For more information about the types in the EDM, see the Entity Data Model Types.

In addition to the types mentioned earlier, the System.Data.Metadata.Edm namespace provides some other classes to represent other important concepts within the models used by the Entity Framework, such as entity containers, entity sets, association sets, and functions.

In the EDM, an EntityContainer represents a logical grouping of entity sets and association sets. An EntitySet represents a logical container for entities of a single type. Similarly, an AssociationSet represents a container for associations of the same type.

The code sample in the EntityContainer class demonstrates how to retrieve information about entity containers and entity sets. For more information about how the entity containers, entity sets, and association sets are used in the EDM, see Entity Containers (EDM), Entity Sets (EDM), and Association Sets (EDM).

Each storage provider or database can include many built-in and user-defined functions. The Entity Framework provides canonical functions to reflect the most commonly used built-in functions. When canonical functions are used in an Entity SQL query, the appropriate function is called at the storage provider. The Functions and Function Parameters (Metadata) topic explains how to retrieve information about the canonical functions defined in the Entity Framework and store-specific functions defined in the underlying storage provider.

See Also

Concepts

Metadata Type Hierarchy
Taxonomy of EDM Types