A newer version of this page is available. Switch to the current version.

NullableAttribute Class

Applies to persistent class' fields or properties. Specifies if a nullable column should be created when updating the database schema for the target property/field.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v18.2.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public sealed class NullableAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True)>
Public NotInheritable Class NullableAttribute
    Inherits Attribute

Remarks

To change the NullableAttribute value for the entire persistent class, apply the NullableBehaviorAttribute instead. To change this setting globally, use the static XpoDefault.NullableBehavior property.

The NullableAttribute does not apply to persistent objects' reference type properties. XPO uses these properties as foreign keys and creates NULL columns for this type. You cannot change this behavior.

See Nullable Behavior and Nullable Columns for more information.

Inheritance

Object
Attribute
NullableAttribute
See Also