End 項目 (Association SSDL)
在 Entity Data Model (EDM) 中,association 項目的 End 子項目會指定經由關聯而相關的實體。下列範例中的關聯會根據經理/員工關聯性來連接 Employee 實體。關聯的兩端具有相同的型別,如同 Type="AdventureWorks.Store.Employee" 指派所指示。
<Association Name="FK_Employee_Employee_ManagerID">
<End Role="Employee" Type="Adventureworks.Store.Employee"
Multiplicity="0..1" />
<End Role="Employee1" Type="Adventureworks.Store.Employee"
Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Employee">
<PropertyRef Name="EmployeeID" />
</Principal>
<Dependent Role="Employee1">
<PropertyRef Name="ManagerID" />
</Dependent>
</ReferentialConstraint>
</Association>