RelationalStrings.DuplicateForeignKeyPrincipalTableMismatch Method

Definition

The foreign keys {foreignKeyProperties1} on '{entityType1}' and {foreignKeyProperties2} on '{entityType2}' are both mapped to '{table}.{foreignKeyName}', but referencing different principal tables ('{principalTable1}' and '{principalTable2}').

C#
public static string DuplicateForeignKeyPrincipalTableMismatch (object index1, object entityType1, object index2, object entityType2, object table, object foreignKeyName, object principalTable1, object principalTable2);
C#
public static string DuplicateForeignKeyPrincipalTableMismatch (object foreignKeyProperties1, object entityType1, object foreignKeyProperties2, object entityType2, object table, object foreignKeyName, object principalTable1, object principalTable2);
C#
public static string DuplicateForeignKeyPrincipalTableMismatch (object? foreignKeyProperties1, object? entityType1, object? foreignKeyProperties2, object? entityType2, object? table, object? foreignKeyName, object? principalTable1, object? principalTable2);

Parameters

index1foreignKeyProperties1
Object
entityType1
Object
index2foreignKeyProperties2
Object
entityType2
Object
table
Object
foreignKeyName
Object
principalTable1
Object
principalTable2
Object

Returns

Applies to

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