CoreStrings.PrimaryKeyAttributeOnDerivedEntity(Object, Object) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Le type dérivé « {derivedType} » ne peut pas avoir l’attribut [PrimaryKey], car les clés primaires peuvent uniquement être déclarées sur le type racine. Déplacez l’attribut vers « {rootType} » ou supprimez « {rootType} » du modèle à l’aide de l’attribut [NotMapped] ou appelez « EntityTypeBuilder.Ignore » sur le type de base « OnModelCreating ».
public static string PrimaryKeyAttributeOnDerivedEntity(object? derivedType, object? rootType);
static member PrimaryKeyAttributeOnDerivedEntity : obj * obj -> string
Public Shared Function PrimaryKeyAttributeOnDerivedEntity (derivedType As Object, rootType As Object) As String
Paramètres
- derivedType
- Object
- rootType
- Object