IMutableEntityType.AddKey Method

Definition

Overloads

AddKey(IMutableProperty)

Adds a new alternate key to this entity type.

AddKey(IReadOnlyList<IMutableProperty>)

Adds a new alternate key to this entity type.

AddKey(IMutableProperty)

Adds a new alternate key to this entity type.

public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableKey AddKey (Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
abstract member AddKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
override this.AddKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Overridable Function AddKey (property As IMutableProperty) As IMutableKey

Parameters

property
IMutableProperty

The property to use as an alternate key.

Returns

The newly created key.

Applies to

AddKey(IReadOnlyList<IMutableProperty>)

Adds a new alternate key to this entity type.

public Microsoft.EntityFrameworkCore.Metadata.IMutableKey AddKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties);
abstract member AddKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Function AddKey (properties As IReadOnlyList(Of IMutableProperty)) As IMutableKey

Parameters

properties
IReadOnlyList<IMutableProperty>

The properties that make up the alternate key.

Returns

The newly created key.

Applies to