IConventionEntityTypeBuilder.CanRemoveKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework