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.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft