Represents an entity container in a conceptual model. An is a logical grouping of entity sets and association sets.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Thetype exposes the following members.
|BaseEntitySets||Gets a list of entity sets and association sets that this includes.|
|BuiltInTypeKind||Gets the built-in type kind for this . (Overrides MetadataItem.BuiltInTypeKind.)|
|Documentation||Gets or sets the documentation associated with this type. (Inherited from MetadataItem.)|
|FunctionImports||Specifies a collection of EdmFunction elements. Each function contains the details of a stored procedure that exists in the database or equivalent CommandText that is mapped to an entity and its properties.|
|MetadataProperties||Gets the list of properties of the current type. (Inherited from MetadataItem.)|
|Name||Gets the name of this .|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|GetEntitySetByName||Returns an EntitySet object by using the specified name for the entity set.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetRelationshipSetByName||Returns a RelationshipSet object by using the specified name for the relationship set.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns the name of this . (Overrides Object.ToString().)|
|TryGetEntitySetByName||Returns an EntitySet object by using the specified name for the entity set.|
|TryGetRelationshipSetByName||Returns a RelationshipSet object by using the specified name for the relationship set.|
On the conceptual level, the class represents a container that will be mapped to a database object in the storage metadata schema. In the storage level, the class represents a description of the table and/or key relationships that persist data for applications built on the model. For more information about the entity containers in a conceptual model, see Entity Containers (EDM).
The following code sample demonstrates how to get a metadata workspace from the connection and then use that metadata workspace to retrieve information about the entity containers in the specified data model. Note that the metadata workspace is a runtime service component that provides support for retrieving metadata.
The GetEntityContainers method gets a collection of entity containers and then iterates through the collection to get each entity set and association set in the specified container. The code sample uses the AdventureWorks Model that is provided in the Adventure Works Model (EDM)topic. For an example of the application config file, see Adventure Works Object Model in Applications (EDM).