CoreStrings.PrimaryKeyAttributeOnDerivedEntity(Object, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
衍生型別 '{derivedType}' 不能有 [PrimaryKey] 屬性,因為主鍵只能在根型上宣告。 將屬性移到 '{rootType}'',或透過 [NotMapped] 屬性或在 'OnModelCreating' 的基底類型中呼叫「EntityTypeBuilder.Ignore' 來移除 '{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