Export (0) Print
Expand All

ObjectContextOptions.UseConsistentNullReferenceBehavior Property

.NET Framework 4.5

Gets or sets a Boolean value that determines whether to use the consistent NullReference behavior.

Namespace:  System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public bool UseConsistentNullReferenceBehavior { get; set; }

Property Value

Type: System.Boolean
true if the consistent NullReference behavior should be used; otherwise, false.

If this flag is set to false, then setting the Value property of the EntityReference<TEntity> for an FK relationship to null when it is already null will have no effect. When this flag is set to true, then setting the value to null will always cause the FK to be nulled and the relationship to be deleted even if the value is currently null. The default value is false when using ObjectContext and true when using DbContext.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft