Dela via


RelationalPropertyExtensions.IsColumnNullable(IProperty) Method

Definition

Checks whether or not the column mapped to the given IProperty will be nullable or not when created in the database.

This can depend not just on the property itself, but also how it is mapped. For example, non-nullable properties in a TPH type hierarchy will be mapped to nullable columns.

public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member IsColumnNullable : Microsoft.EntityFrameworkCore.Metadata.IProperty -> bool
<Extension()>
Public Function IsColumnNullable (property As IProperty) As Boolean

Parameters

property
IProperty

The IProperty.

Returns

True if the mapped column is nullable; false otherwise.

Applies to