DeleteFunction(AssociationSetMapping)
EDM(엔터티 데이터 모델)에 있는 AssociationSetMapping 요소의 자식 요소인 ModificationFunctionMapping 요소의 DeleteFunction 요소는 엔터티 간의 연결을 삭제하는 저장 프로시저를 식별합니다.
이 연결을 삭제하기 위해 DeleteFunction 요소는 저장소 스키마에서 Association의 두 End에 있는 엔터티의 키 속성을 저장소 모델의 저장 프로시저 매개 변수에 매핑합니다. 저장 프로시저는 저장소의 Association 인스턴스를 삭제합니다.
매핑되는 Association의 두 End를 지정하기 위해 DeleteFunction 요소는 해당 EndProperty 자식 요소를 사용합니다.
참고 |
---|
AssociationSetMapping 요소의 DeleteFunction과 달리, EntityTypeMapping 요소의 DeleteFunction 요소에는 EndProperty 자식 요소가 포함되어 있지 않습니다. 대신 EntityTypeMapping 요소의 DeleteFunction 요소에는 만드는 엔터티가 참조할 수 있는 연결을 매핑하는 AssociationEnd 요소가 포함됩니다. 자세한 내용은 DeleteFunction(EntityTypeMapping) 및 AssociationEnd(EntityTypeMapping)를 참조하십시오. |
예제
다음 예제에서 DeleteFunction 요소는 Adventureworks Sales 모델의 Contact_Address
Association 인스턴스를 삭제하는 저장 프로시저를 매핑합니다. EndProperty 요소의 ScalarProperty 자식 요소는 Contact
및 Address
엔터티의 ID 속성을 ParameterName 특성이 지정하는 저장 프로시저 매개 변수에 매핑합니다.
<DeleteFunction
FunctionName="ContactInformationModel.Store.DeleteAddress">
<EndProperty Name="Address">
<ScalarProperty Name="AddressID" ParameterName="AddressID"/>
</EndProperty>
<EndProperty Name="Contact">
<ScalarProperty Name="ContactID" ParameterName="ContactID"/>
</EndProperty>
</DeleteFunction>
참고 항목
작업
방법: 저장 프로시저로 모델 정의(Entity Framework)
개념
InsertFunction(AssociationSetMapping)
저장 프로시저 지원(Entity Framework)
ModificationFunctionMapping(AssociationSetMapping)
EndProperty(AssociationSet ModificationFunctionMapping)
AssociationSetMapping 요소(MSL)