作为实体数据模型 (EDM) 中 AssociationSetMapping 元素的子元素,ModificationFunctionMapping 元素中的 DeleteFunction 元素标识用于删除实体之间的关联的存储过程。
为删除此关联,DeleteFunction 元素将存储架构中的 Association 两端的实体的键属性映射到存储模型中的存储过程的参数。该存储过程删除存储中的 Association 的实例。
为指定要映射的 Association 元素的两端,DeleteFunction 元素使用其 EndProperty 子元素。
| .gif) 注意 | 
|---|
| 与 AssociationSetMapping 元素中的 DeleteFunction 不同,EntityTypeMapping 元素中的 DeleteFunction 元素不包含 EndProperty 子元素。但 EntityTypeMapping 元素中的 DeleteFunction 元素包含一个 AssociationEnd 元素,此元素映射正在创建的实体可能引用的关联。有关更多信息,请参见DeleteFunction (EntityTypeMapping) 和 AssociationEnd (EntityTypeMapping)。 | 
示例
在下面的示例中,DeleteFunction 元素映射一个删除 Adventureworks 销售模型中 Contact_AddressAssociation 实例的存储过程。EndProperty 元素的 ScalarProperty 子元素将 Contact 和 Address 实体的标识属性 (Property) 映射到 ParameterName 属性 (Attribute) 所指定的存储过程参数。
      <DeleteFunction
        FunctionName="ContactInformationModel.Store.DeleteAddress">
        <EndProperty Name="Address">
          <ScalarProperty Name="AddressID" ParameterName="AddressID"/>
        </EndProperty>
        <EndProperty Name="Contact">
          <ScalarProperty Name="ContactID" ParameterName="ContactID"/>
        </EndProperty>
      </DeleteFunction>
另请参见
任务
概念
InsertFunction (AssociationSetMapping)
存储过程支持(实体框架)
ModificationFunctionMapping (AssociationSetMapping)
EndProperty (AssociationSet ModificationFunctionMapping)
AssociationSetMapping 元素 (MSL)