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
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för