EntityContainer Class

 

Represents an entity container in a conceptual model. An EntityContainer is a logical grouping of entity sets and association sets.

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

System.Object
  System.Data.Metadata.Edm.MetadataItem
    System.Data.Metadata.Edm.GlobalItem
      System.Data.Metadata.Edm.EntityContainer

[<Sealed>]
type EntityContainer = 
    class
        inherit GlobalItem
    end

NameDescription
System_CAPS_pubpropertyBaseEntitySets

Gets a list of entity sets and association sets that this EntityContainer includes.

System_CAPS_pubpropertyBuiltInTypeKind

Gets the built-in type kind for this EntityContainer.(Overrides MetadataItem.BuiltInTypeKind.)

System_CAPS_pubpropertyDocumentation

Gets or sets the documentation associated with this type.(Inherited from MetadataItem.)

System_CAPS_pubpropertyFunctionImports

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.

System_CAPS_pubpropertyMetadataProperties

Gets the list of properties of the current type.(Inherited from MetadataItem.)

System_CAPS_pubpropertyName

Gets the name of this EntityContainer.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetEntitySetByName(String, Boolean)

Returns an EntitySet object by using the specified name for the entity set.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetRelationshipSetByName(String, Boolean)

Returns a RelationshipSet object by using the specified name for the relationship set.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the name of this EntityContainer.(Overrides Object.ToString().)

System_CAPS_pubmethodTryGetEntitySetByName(String, Boolean, EntitySet)

Returns an EntitySet object by using the specified name for the entity set.

System_CAPS_pubmethodTryGetRelationshipSetByName(String, Boolean, RelationshipSet)

Returns a RelationshipSet object by using the specified name for the relationship set.

On the conceptual level, the EntityContainer class represents a container that will be mapped to a database object in the storage metadata schema. In the storage level, the EntityContainer 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 code sample uses a CSpace and a SSpace to specify the model. The CSpace represents the default name for the conceptual model. The SSpace represents the default name for the storage model.

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).

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: