Share via


CoreStrings.KeyAttributeOnDerivedEntity Method

Definition

Overloads

KeyAttributeOnDerivedEntity(Object, Object)

The derived type '{derivedType}' cannot have the [Key] attribute on property '{property}' since primary keys may only be declared on the root type.

KeyAttributeOnDerivedEntity(Object, Object, Object)

The derived type '{derivedType}' cannot have the [Key] attribute on property '{property}' since primary keys may only be declared on the root type. Move the property '{property}' to '{rootType}' or remove '{rootType}' from the model by using [NotMapped] attribute or calling 'EntityTypeBuilder.Ignore' on the base type in 'OnModelCreating'.

KeyAttributeOnDerivedEntity(Object, Object)

The derived type '{derivedType}' cannot have the [Key] attribute on property '{property}' since primary keys may only be declared on the root type.

public static string KeyAttributeOnDerivedEntity (object derivedType, object property);
static member KeyAttributeOnDerivedEntity : obj * obj -> string
Public Shared Function KeyAttributeOnDerivedEntity (derivedType As Object, property As Object) As String

Parameters

derivedType
Object
property
Object

Returns

Applies to

KeyAttributeOnDerivedEntity(Object, Object, Object)

The derived type '{derivedType}' cannot have the [Key] attribute on property '{property}' since primary keys may only be declared on the root type. Move the property '{property}' to '{rootType}' or remove '{rootType}' from the model by using [NotMapped] attribute or calling 'EntityTypeBuilder.Ignore' on the base type in 'OnModelCreating'.

public static string KeyAttributeOnDerivedEntity (object? derivedType, object? property, object? rootType);
static member KeyAttributeOnDerivedEntity : obj * obj * obj -> string
Public Shared Function KeyAttributeOnDerivedEntity (derivedType As Object, property As Object, rootType As Object) As String

Parameters

derivedType
Object
property
Object
rootType
Object

Returns

Applies to