Jazyk

CoreStrings.PrimaryKeyAttributeOnDerivedEntity(Object, Object) Metoda

Definice

Odvozený typ {derivedType} nemůže mít atribut [PrimaryKey], protože primární klíče mohou být deklarovány pouze v kořenovém typu. Přesuňte atribut do {rootType} nebo odeberte z modelu atribut {rootType} pomocí atributu [NotMapped] nebo volání EntityTypeBuilder.Ignore na základní typ v 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

Parametry

derivedType
Object
rootType
Object

Návraty

Platí pro