CoreStrings.CompositePKWithDataAnnotation(Object) Method

Definition

The entity type '{entityType}' has multiple properties with the [Key] attribute. Composite primary keys configured by placing the [PrimaryKey] attribute on the entity type class, or by using 'HasKey' in 'OnModelCreating'.

C#
public static string CompositePKWithDataAnnotation (object entityType);
C#
public static string CompositePKWithDataAnnotation (object? entityType);

Parameters

entityType
Object

Returns

Applies to

Product Versions
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0