Язык

CoreStrings.PrimaryKeyDefinedOnIgnoredProperty(Object, Object) Метод

Определение

Атрибут [PrimaryKey] типа сущности "{entityType}" недопустим, так как свойство "{propertyName}" было отмечено как не сопоставленное атрибутом [NotMapped] или "Ignore()" в OnModelCreating. Первичный ключ не может использовать несопоставленные свойства.

public static string PrimaryKeyDefinedOnIgnoredProperty(object? entityType, object? propertyName);
static member PrimaryKeyDefinedOnIgnoredProperty : obj * obj -> string
Public Shared Function PrimaryKeyDefinedOnIgnoredProperty (entityType As Object, propertyName As Object) As String

Параметры

entityType
Object
propertyName
Object

Возвращаемое значение

Применяется к