Condividi tramite


CoreStrings.PrimaryKeyAttributeOnDerivedEntity(Object, Object) Metodo

Definizione

Il tipo derivato '{derivedType}' non può avere l'attributo [PrimaryKey] perché le chiavi primarie possono essere dichiarate solo nel tipo radice. Spostare l'attributo su '{rootType}', oppure rimuovere '{rootType}' dal modello usando l'attributo [NotMapped] o chiamando 'EntityTypeBuilder.Ignore' nel tipo di base in '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

Parametri

derivedType
Object
rootType
Object

Restituisce

Si applica a