CoreStrings.DuplicateForeignKey Method

Definition

The foreign key {foreignKeyProperties} cannot be added to the entity type '{entityType}' because a foreign key on the same properties already exists on entity type '{duplicateEntityType}' and also targets the key {keyProperties} on '{principalType}'.

C#
public static string DuplicateForeignKey (object foreignKey, object entityType, object duplicateEntityType, object key, object principalType);
C#
public static string DuplicateForeignKey (object foreignKeyProperties, object entityType, object duplicateEntityType, object keyProperties, object principalType);
C#
public static string DuplicateForeignKey (object? foreignKeyProperties, object? entityType, object? duplicateEntityType, object? keyProperties, object? principalType);

Parameters

foreignKeyforeignKeyProperties
Object
entityType
Object
duplicateEntityType
Object
keykeyProperties
Object
principalType
Object

Returns

Applies to

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