CoreStrings.InvalidAlternateKeyValue(Object, Object) Method

Definition

Unable to track an entity of type '{entityType}' because alternate key property '{keyProperty}' is null. If the alternate key is not used in a relationship, then consider using a unique index instead. Unique indexes may contain nulls, while alternate keys may not.

C#
public static string InvalidAlternateKeyValue (object entityType, object keyProperty);
C#
public static string InvalidAlternateKeyValue (object? entityType, object? keyProperty);

Parameters

entityType
Object
keyProperty
Object

Returns

Applies to

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