CoreStrings.NullableKey(Object, Object) Method

Definition

A key on entity type '{entityType}' cannot contain the property '{property}' because it is nullable/optional. All properties on which a key is declared must be marked as non-nullable/required.

C#
public static string NullableKey (object entityType, object property);
C#
public static string NullableKey (object? entityType, object? property);

Parameters

entityType
Object
property
Object

Returns

Applies to

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