Zuordnungssatzendeassociation set end
Ein Zuordnungs Satz Ende identifiziert den Entitätstyp und die Entitätenmenge am Ende eines Zuordnungs Satzes.An association set end identifies the entity type and the entity set at the end of an association set. Zuordnungssatzenden werden als Teil eines Zuordnungssatzes definiert. Ein Zuordnungssatz muss genau zwei Zuordnungssatzenden aufweisen.Association set ends are defined as part of an association set; an association set must have exactly two association set ends.
Die Definition eines Zuordnungssatzendes enthält die folgenden Informationen:An association set end definition contains the following information:
Einen der Entitätstypen des Zuordnungssatzes.One of the entity types involved in the association set. (erforderlich)(Required)
Die Entitätenmenge für den Entitätstyp im Zuordnungssatz.The entity set for the entity type involved in the association set. (erforderlich)(Required)
BeispielExample
Die unten stehende Abbildung zeigt ein konzeptionelles Modell mit zwei Zuordnungen: WrittenBy
und PublishedBy
.The diagram below shows a conceptual model with two associations: WrittenBy
and PublishedBy
.
Die folgende Abbildung zeigt einen Zuordnungssatz (PublishedBy
) sowie zwei Entitätenmengen (Books
und Publishers
) auf Grundlage des oben gezeigten konzeptionellen Modells.The following diagram shows an association set (PublishedBy
) and two entity sets (Books
and Publishers
) based on the conceptual model shown above. Die Zuordnungssatzenden sind die Entitätenmengen Books
und Publishers
.The association set ends are the Books
and Publishers
entity sets. BI in der Books
Entitätenmenge stellt eine Instanz des Book
Entitäts Typs zur Laufzeit dar.Bi in the Books
entity set represents an instance of the Book
entity type at run time. Ebenso stellt PJ eine Publisher
Instanz in der Publishers
Entitätenmenge dar.Similarly, Pj represents a Publisher
instance in the Publishers
entity set. Bipj stellt eine Instanz der PublishedBy
Zuordnung im PublishedBy
Zuordnungs Satz dar.BiPj represents an instance of the PublishedBy
association in the PublishedBy
association set.
Der ADO.NET-Entity Framework verwendet eine DSL namens konzeptionelle Schema Definitions Sprache (CSDL), um konzeptionelle Modelle zu definieren.The ADO.NET Entity Framework uses a DSL called conceptual schema definition language (CSDL) to define conceptual models. Die folgende CSDL definiert einen Entitätscontainer mit einem Zuordnungssatz für jede Zuordnung in der oben gezeigten Abbildung.The following CSDL defines an entity container with one association set for each association in the diagram above. Beachten Sie, dass Zuordnungssatzenden als Teil jeder Zuordnungssatzdefinition definiert werden.Note that association set ends are defined as part of each association set definition.
<EntityContainer Name="BooksContainer" >
<EntitySet Name="Books" EntityType="BooksModel.Book" />
<EntitySet Name="Publishers" EntityType="BooksModel.Publisher" />
<EntitySet Name="Authors" EntityType="BooksModel.Author" />
<AssociationSet Name="PublishedBy" Association="BooksModel.PublishedBy">
<End Role="Book" EntitySet="Books" />
<End Role="Publisher" EntitySet="Publishers" />
</AssociationSet>
<AssociationSet Name="WrittenBy" Association="BooksModel.WrittenBy">
<End Role="Book" EntitySet="Books" />
<End Role="Author" EntitySet="Authors" />
</AssociationSet>
</EntityContainer>