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