次の方法で共有


CoreStrings.PrimaryKeyAttributeOnDerivedEntity(Object, Object) メソッド

定義

主キーはルート型でのみ宣言できるため、派生型 '{derivedType}' は [PrimaryKey] 属性を持つことができません。 [NotMapped] 属性を使用するか、'OnModelCreating' の基本型で 'EntityTypeBuilder.Ignore' を呼び出して、属性を '{rootType}' に移動するか、モデルから '{rootType}' を削除します。

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

パラメーター

derivedType
Object
rootType
Object

戻り値

適用対象