IConventionEntityType.RemoveKey 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
RemoveKey(IConventionKey) |
Removes a primary or alternate key from this entity type. |
RemoveKey(IReadOnlyKey) |
Removes a primary or alternate key from this entity type. |
RemoveKey(IReadOnlyList<IReadOnlyProperty>) |
Removes a primary or alternate key from this entity type. |
RemoveKey(IConventionKey)
Removes a primary or alternate key from this entity type.
public void RemoveKey (Microsoft.EntityFrameworkCore.Metadata.IConventionKey key);
public Microsoft.EntityFrameworkCore.Metadata.IConventionKey RemoveKey (Microsoft.EntityFrameworkCore.Metadata.IConventionKey key);
abstract member RemoveKey : Microsoft.EntityFrameworkCore.Metadata.IConventionKey -> unit
abstract member RemoveKey : Microsoft.EntityFrameworkCore.Metadata.IConventionKey -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Sub RemoveKey (key As IConventionKey)
Public Function RemoveKey (key As IConventionKey) As IConventionKey
Parameters
- key
- IConventionKey
The key to be removed.
Returns
The removed key.
Applies to
RemoveKey(IReadOnlyKey)
Removes a primary or alternate key from this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IConventionKey? RemoveKey (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey key);
abstract member RemoveKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Function RemoveKey (key As IReadOnlyKey) As IConventionKey
Parameters
- key
- IReadOnlyKey
The key to be removed.
Returns
The removed key, or null
if the key was not found.
Applies to
RemoveKey(IReadOnlyList<IReadOnlyProperty>)
Removes a primary or alternate key from this entity type.
public Microsoft.EntityFrameworkCore.Metadata.IConventionKey? RemoveKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties);
abstract member RemoveKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> -> Microsoft.EntityFrameworkCore.Metadata.IConventionKey
Public Function RemoveKey (properties As IReadOnlyList(Of IReadOnlyProperty)) As IConventionKey
Parameters
- properties
- IReadOnlyList<IReadOnlyProperty>
The properties that make up the key.
Returns
The key that was removed.
Applies to
Entity Framework