Freigeben über


How to: Create and Edit Association Mappings

Associations define relationships between entity types in the Entity Data Model (EDM). Association details are specified in the corresponding association mapping. You can create and edit association mappings can in the Mapping Details window of the ADO.NET Entity Data Model Designer (Entity Designer).

For information about how to use Entity Designer to create associaions between entity types, see How to: Create and Edit Associations.

To create an association mapping

  1. Select an association in the design surface.

    This displays the association mapping in the Mapping Details window.

  2. Click Add a Table or View.

    A drop-down list appears that includes all the tables in the storage model.

  3. Select the table to which the association will map.

    The Mapping Details window displays both ends of the association and the key properties for the entity type at each End.

  4. For each key property, click the Column field, and select the column to which the property will map.

To edit an association mapping

  1. Select an association in the design surface.

    This displays the association mapping in the Mapping Details window.

  2. Click Maps to <Table Name>.

    A drop-down list appears that includes all the tables in the storage model.

  3. Select the table to which the association will map.

    The Mapping Details window displays both ends of the association and the key properties for the entity type at each End.

  4. For each key property, click the Column field, and select the column to which the property will map.

See Also

Other Resources

Entity Data Model Tools Tasks