EndProperty (AssociationSet ModificationFunctionMapping)
ModificationFunctionMapping 項目的 EndProperty 項目在 Entity Data Model (EDM) 中是做為 AssociationSetMapping 項目的子項目,會指定 Association 兩端實體的索引鍵屬性對應 (AssociationSetMapping 項目會將 Association 對應到用於建立和刪除關聯執行個體的預存程序)。
EndProperty 項目的 ScalarProperty 子項目會將相關實體的識別屬性 (Property) 對應到 ParameterName 屬性 (Attribute) 所指定的預存程序參數。
![]() |
---|
AssociationSetMapping 項目中的 EndProperty 項目,與 EntityTypeMapping 項目中的 AssociationEnd 項目並不相同。如需詳細資訊,請參閱 AssociationEnd (EntityTypeMapping)。 |
範例
在下列範例中,EndProperty 項目是 InsertFunction 項目的一部分。這個 InsertFunction 項目所對應的預存程序,會在 Adventureworks 銷售模型中的 Contact
實體和 Address
實體間建立 Association 項目的新執行個體。
<InsertFunction
FunctionName="ContactInformationModel.Store.SetAddress">
<EndProperty Name="Address">
<ScalarProperty Name="AddressID" ParameterName="AddressID"/>
</EndProperty>
<EndProperty Name="Contact">
<ScalarProperty Name="ContactID" ParameterName="ContactID"/>
</EndProperty>
</InsertFunction>
另請參閱
概念
InsertFunction (AssociationSetMapping
DeleteFunction (AssociationSetMapping)
AssociationSetMapping 項目 (MSL)
預存程序支援 (Entity Framework)