This documentation is archived and is not being maintained.

EntityContainerMapping Element (MSL)

The EntityContainerMapping element in mapping specification language (MSL) maps the entity container in the conceptual model to the entity container in the storage model. The EntityContainerMapping element is a child of the Mapping element.

The EntityContainerMapping element can have the following child elements (in the order listed):

Applicable Attributes

The following table describes the attributes that can be applied to the EntityContainerMapping element.

Attribute Name Is Required Value



The name of the storage model entity container that is being mapped.



The name of the conceptual model entity container that is being mapped.



True or False. If False, no update views are generated. This attribute should be set to False when you have a read-only mapping that would be invalid because data may not round-trip successfully.

The default value is True.


The following example shows an EntityContainerMapping element that maps the SchoolModelEntities container (the conceptual model entity container) to the SchoolModelStoreContainer container (the storage model entity container):

<EntityContainerMapping StorageEntityContainer="SchoolModelStoreContainer" 
  <EntitySetMapping Name="Courses">
    <EntityTypeMapping TypeName="c.Course">
      <MappingFragment StoreEntitySet="Course">
        <ScalarProperty Name="CourseID" ColumnName="CourseID" />
        <ScalarProperty Name="Title" ColumnName="Title" />
        <ScalarProperty Name="Credits" ColumnName="Credits" />
        <ScalarProperty Name="DepartmentID" ColumnName="DepartmentID" />
  <EntitySetMapping Name="Departments">
    <EntityTypeMapping TypeName="c.Department">
      <MappingFragment StoreEntitySet="Department">
        <ScalarProperty Name="DepartmentID" ColumnName="DepartmentID" />
        <ScalarProperty Name="Name" ColumnName="Name" />
        <ScalarProperty Name="Budget" ColumnName="Budget" />
        <ScalarProperty Name="StartDate" ColumnName="StartDate" />
        <ScalarProperty Name="Administrator" ColumnName="Administrator" />

See Also