Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.84 KB

entity-container.md

File metadata and controls

32 lines (20 loc) · 1.84 KB
description title ms.date ms.assetid
Learn more about: entity container
entity container
03/30/2017
16e80405-2c75-42fc-b0e4-b1df53b1c584

entity container

An entity container is a logical grouping of entity sets, association sets, and function imports.

The following must be true of an entity container defined in a conceptual model:

  • At least one entity container must be defined in each conceptual model.

  • The entity container must have a unique name within each conceptual model.

An entity container can define entity sets or association sets that use entity types or associations defined in one or more namespaces. For more information, see Entity Data Model: Namespaces.

Example

The diagram below shows a conceptual model with three entity types: Book, Publisher, and Author. See the next example for more information.

Example model with three entity types

Although the diagram does not convey entity container information, the conceptual model must define an entity container. The ADO.NET Entity Framework uses a DSL called conceptual schema definition language (CSDL) to define conceptual models. The following CSDL defines an entity container for the conceptual model shown in the diagram above. Note that the entity container name is defined in an XML attribute.

[!code-xmlEDM_Example_Model#EntityContainerExample]

See also