RelationalPropertyExtensions.IsColumnNullable 方法

定義

多載

IsColumnNullable(IProperty)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

IsColumnNullable(IReadOnlyProperty)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

IsColumnNullable(IProperty, StoreObjectIdentifier)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

IsColumnNullable(IReadOnlyProperty, StoreObjectIdentifier)

檢查在資料庫中建立時,對應至指定屬性的資料行是否可為 Null。

IsColumnNullable(IProperty)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

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

參數

property
IProperty

IProperty

傳回

true 如果對應的資料行可為 Null,則為 ; false 否則。

適用於

IsColumnNullable(IReadOnlyProperty)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

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

參數

傳回

true 如果對應的資料行可為 Null,則為 ; false 否則。

備註

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

適用於

IsColumnNullable(IProperty, StoreObjectIdentifier)

檢查在資料庫中建立時,對應至指定 IProperty 的資料行是否可為 Null。

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

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

參數

property
IProperty

IProperty

storeObject
StoreObjectIdentifier

包含資料行之類似資料表的存放區物件的識別碼。

傳回

true 如果對應的資料行可為 Null,則為 ; false 否則。

適用於

IsColumnNullable(IReadOnlyProperty, StoreObjectIdentifier)

檢查在資料庫中建立時,對應至指定屬性的資料行是否可為 Null。

public static bool IsColumnNullable (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);
static member IsColumnNullable : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty * StoreObjectIdentifier -> bool
<Extension()>
Public Function IsColumnNullable (property As IReadOnlyProperty, ByRef storeObject As StoreObjectIdentifier) As Boolean

參數

property
IReadOnlyProperty

屬性。

storeObject
StoreObjectIdentifier

包含資料行之類似資料表的存放區物件的識別碼。

傳回

true 如果對應的資料行可為 Null,則為 ; false 否則。

備註

這取決於屬性本身,以及其對應方式。 例如,TPH 類型階層中的衍生不可為 Null 屬性會對應至可為 Null 的資料行。 以及共用相同資料表之選擇性型別的屬性。

適用於