ObjectContextOptions.UseConsistentNullReferenceBehavior 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
일관된 NullReference 동작을 사용할지 여부를 결정하는 부울 값을 가져오거나 설정합니다.
public:
property bool UseConsistentNullReferenceBehavior { bool get(); void set(bool value); };
public bool UseConsistentNullReferenceBehavior { get; set; }
member this.UseConsistentNullReferenceBehavior : bool with get, set
Public Property UseConsistentNullReferenceBehavior As Boolean
속성 값
true일관된 NullReference 동작을 사용해야 하는 경우 그렇지 않으면 . false
설명
이 플래그가 설정된 false경우 이미 null인 경우 FK 관계의 Value 속성을 EntityReference<TEntity> null로 설정해도 아무런 효과가 없습니다. 이 플래그가 true설정된 경우 값을 null로 설정하면 값이 현재 null인 경우에도 항상 FK가 null이 되고 관계가 삭제됩니다. 기본값은 false ObjectContext true 를 사용하고 DbContext를 사용하는 경우입니다.