IMutableEntityType.AddKey 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
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework