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>

另请参见

概念

End 元素 (Association CSDL)