CoreStrings.KeyAttributeOnDerivedEntity 方法

定义

重载

KeyAttributeOnDerivedEntity(Object, Object)

派生类型“{derivedType}”不能在属性“{property}”上具有 [Key] 属性,因为主键只能在根类型上声明。

KeyAttributeOnDerivedEntity(Object, Object, Object)

派生类型“{derivedType}”不能在属性“{property}”上具有 [Key] 属性,因为主键只能在根类型上声明。 使用 [NotMapped] 属性或调用“OnModelCreating”中基类型的“EntityTypeBuilder.Ignore”,将属性“{property}”移动到“{rootType}”或从模型中删除“{rootType}”。

KeyAttributeOnDerivedEntity(Object, Object)

派生类型“{derivedType}”不能在属性“{property}”上具有 [Key] 属性,因为主键只能在根类型上声明。

public static string KeyAttributeOnDerivedEntity (object derivedType, object property);
static member KeyAttributeOnDerivedEntity : obj * obj -> string
Public Shared Function KeyAttributeOnDerivedEntity (derivedType As Object, property As Object) As String

参数

derivedType
Object
property
Object

返回

适用于

KeyAttributeOnDerivedEntity(Object, Object, Object)

派生类型“{derivedType}”不能在属性“{property}”上具有 [Key] 属性,因为主键只能在根类型上声明。 使用 [NotMapped] 属性或调用“OnModelCreating”中基类型的“EntityTypeBuilder.Ignore”,将属性“{property}”移动到“{rootType}”或从模型中删除“{rootType}”。

public static string KeyAttributeOnDerivedEntity (object? derivedType, object? property, object? rootType);
static member KeyAttributeOnDerivedEntity : obj * obj * obj -> string
Public Shared Function KeyAttributeOnDerivedEntity (derivedType As Object, property As Object, rootType As Object) As String

参数

derivedType
Object
property
Object
rootType
Object

返回

适用于