IConventionEntityTypeBuilder.CanRemoveKey 方法

定義

多載

CanRemoveKey(Boolean)

傳回值,指出實體類型是否可以標示為無索引鍵。

CanRemoveKey(IConventionKey, Boolean)

傳回值,指出是否可以從這個實體類型中移除索引鍵。

CanRemoveKey(Boolean)

傳回值,指出實體類型是否可以標示為無索引鍵。

public bool CanRemoveKey (bool fromDataAnnotation = false);
abstract member CanRemoveKey : bool -> bool
Public Function CanRemoveKey (Optional fromDataAnnotation As Boolean = false) As Boolean

參數

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

true 如果實體類型可以標示為無索引鍵,則為 。

適用於

CanRemoveKey(IConventionKey, Boolean)

傳回值,指出是否可以從這個實體類型中移除索引鍵。

public bool CanRemoveKey (Microsoft.EntityFrameworkCore.Metadata.IConventionKey key, bool fromDataAnnotation = false);
abstract member CanRemoveKey : Microsoft.EntityFrameworkCore.Metadata.IConventionKey * bool -> bool
Public Function CanRemoveKey (key As IConventionKey, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

key
IConventionKey

要移除的索引鍵。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

true 如果可以從這個實體類型中移除索引鍵,則為 。

適用於