Back to Devexpress

XPDictionary.NullableBehavior Property

xpo-devexpress-dot-xpo-dot-metadata-dot-xpdictionary.md

latest3.1 KB
Original Source

XPDictionary.NullableBehavior Property

Specifies if nullable columns should be created when updating the database schema.

Namespace : DevExpress.Xpo.Metadata

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public NullableBehavior NullableBehavior { get; set; }
vb
Public Property NullableBehavior As NullableBehavior

Property Value

TypeDescription
NullableBehavior

A NullableBehavior enumeration value specifying if a nullable column should be created when updating the database schema.

|

Available values:

NameDescription
Default

The default mode. Has the same effect as AlwaysAllowNulls.

| | AlwaysAllowNulls |

A nullable column is always created.

| | ByUnderlyingType |

A nullable column is created when the mapped property type is not a value type.

|

Remarks

The default NullableBehavior value is taken from the static XpoDefault.NullableBehavior property value.

The NullableBehavior value can be overridden for an individual persistent class of field using the:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NullableBehavior property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/Helpers/ConnectionHelper.cs#L35

csharp
var dictionary = new ReflectionDictionary();
dictionary.NullableBehavior = NullableBehavior.ByUnderlyingType;
dictionary.GetDataStoreSchema(persistentTypes);

See Also

XPDictionary Class

XPDictionary Members

DevExpress.Xpo.Metadata Namespace