나는 나의 모델엔티티 프레임 워크에서 계단식 삭제 방법은 무엇입니까? N 관계 :
차와 1 carPart
에 두 개체가 있습니다.
엔티티 카를 캐스케이드 삭제하고 싶습니다.
The operation failed: The relationship could not be changed because one or
more of the foreign-key properties is non-nullable. When a change is made
to a relationship, the related foreign-key property is set to a null value.
If the foreign-key does not support null values, a new relationship must
be defined, the foreign-key property must be assigned another non-null value,
or the unrelated object must be deleted.
내가 먼저 다음 자동차 부품을 자동차 객체를 삭제하려고 생각 : 나는 삭제할 때 나는 다음과 같은 예외를 얻을.
외래 키로 인해 불가능한 것입니다.
어떻게 처리합니까?
분명히 carPart를 먼저 지우고 차를 지우고 싶습니다.
감사합니다.
감사합니다! –