EntityTypeBuilder.HasAlternateKey(String[]) 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.
Creates an alternate key in the model for this entity type if one does not already exist over the specified properties. This will force the properties to be read-only. Use HasIndex to specify uniqueness in the model that does not force properties to be read-only.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder HasAlternateKey (params string[] propertyNames);
abstract member HasAlternateKey : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder
override this.HasAlternateKey : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder
Public Overridable Function HasAlternateKey (ParamArray propertyNames As String()) As KeyBuilder
Parameters
- propertyNames
- String[]
The names of the properties that make up the key.
Returns
An object that can be used to configure the key.
Applies to
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: