IConventionKey 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表實體上的主鍵或備用鍵。
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey
public interface IConventionKey : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IKey
type IConventionKey = interface
interface IReadOnlyKey
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
type IConventionKey = interface
interface IConventionAnnotatable
interface IAnnotatable
interface IKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IReadOnlyKey
Public Interface IConventionKey
Implements IConventionAnnotatable, IKey
- 實作
備註
此介面用於模型建立時,允許修改元資料。 模型建構完成後,代表 IKey 同一元資料的唯讀視圖。
更多資訊與範例請參閱 模型建構慣例 。
屬性
| 名稱 | Description |
|---|---|
| Builder |
取得可以用來設定此金鑰的建構器。 |
| DeclaringEntityType |
取得金鑰所定義的實體類型。 這可能與定義在繼承階層中的衍生型別時所定義的型別 Properties 不同(因為屬性可能定義在基底型態上)。 |
| IsInModel |
表示該物件是否在模型中,也就是尚未從模型中移除。 (繼承來源 IConventionAnnotatable) |
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
| Properties |
取得構成金鑰的屬性。 |