ColumnAttribute.CanBeNull Property

Gets or sets whether a column can contain null values.

Namespace:  System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public bool CanBeNull { get; set; }

Property Value

Type: System.Boolean
Default = true.

If you set this value to false, the data in the corresponding column is assumed to be non-null.

NoteNote:

This property is duplicated from the DbType property for convenience. The CreateDatabase method uses only the DbType property. For this reason, you must specify whether a column can contain null values in the DbType property also.

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: