IConventionEntityTypeBuilder.CanRemoveKey Method

Definition

Overloads

CanRemoveKey(Boolean)

Returns a value indicating whether the entity type can be marked as keyless.

CanRemoveKey(IConventionKey, Boolean)

Returns a value indicating whether the key can be removed from this entity type.

CanRemoveKey(Boolean)

Returns a value indicating whether the entity type can be marked as keyless.

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

Parameters

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the entity type can be marked as keyless.

Applies to

CanRemoveKey(IConventionKey, Boolean)

Returns a value indicating whether the key can be removed from this entity type.

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

Parameters

key
IConventionKey

The key to be removed.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the key can be removed from this entity type.

Applies to