RelationalPropertyExtensions.IsColumnNullable Method

Definition

Overloads

IsColumnNullable(IProperty)

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

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

IsColumnNullable(IReadOnlyProperty)

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

IsColumnNullable(IProperty, StoreObjectIdentifier)

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

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

IsColumnNullable(IReadOnlyProperty, StoreObjectIdentifier)

Checks whether the column mapped to the given property will be nullable when created in the database.

IsColumnNullable(IProperty)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

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

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

C#
public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);

Parameters

property
IProperty

The IProperty.

Returns

true if the mapped column is nullable; false otherwise.

Applies to

Entity Framework Core 5.0 i druge verzije
Proizvod Verzije
Entity Framework Core 3.0, 3.1, 5.0

IsColumnNullable(IReadOnlyProperty)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

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

C#
public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);

Parameters

Returns

true if the mapped column is nullable; false otherwise.

Remarks

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

Applies to

Entity Framework Core 9.0 i druge verzije
Proizvod Verzije
Entity Framework Core 6.0, 7.0, 8.0, 9.0

IsColumnNullable(IProperty, StoreObjectIdentifier)

Source:
RelationalPropertyExtensions.cs

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

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

C#
public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);

Parameters

property
IProperty

The IProperty.

storeObject
StoreObjectIdentifier

The identifier of the table-like store object containing the column.

Returns

true if the mapped column is nullable; false otherwise.

Applies to

Entity Framework Core 5.0
Proizvod Verzije
Entity Framework Core 5.0

IsColumnNullable(IReadOnlyProperty, StoreObjectIdentifier)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

Checks whether the column mapped to the given property will be nullable when created in the database.

C#
public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);

Parameters

property
IReadOnlyProperty

The property.

storeObject
StoreObjectIdentifier

The identifier of the table-like store object containing the column.

Returns

true if the mapped column is nullable; false otherwise.

Remarks

This depends on the property itself and also how it is mapped. For example, derived non-nullable properties in a TPH type hierarchy will be mapped to nullable columns. As well as properties on optional types sharing the same table.

Applies to

Entity Framework Core 9.0 i druge verzije
Proizvod Verzije
Entity Framework Core 6.0, 7.0, 8.0, 9.0