IConventionAnnotatable 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個可以公開可修改註解的類別。 註解允許在物件上儲存任意的元資料。
此介面通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。
public interface IConventionAnnotatable : Microsoft.EntityFrameworkCore.Infrastructure.IReadOnlyAnnotatable
public interface IConventionAnnotatable : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable
type IConventionAnnotatable = interface
interface IReadOnlyAnnotatable
type IConventionAnnotatable = interface
interface IAnnotatable
Public Interface IConventionAnnotatable
Implements IReadOnlyAnnotatable
Public Interface IConventionAnnotatable
Implements IAnnotatable
- 衍生
- 實作
備註
更多資訊與範例請參閱 模型建構慣例 。
屬性
| 名稱 | Description |
|---|---|
| Builder |
取得可用來配置此物件的建構工具。 |
| IsInModel |
表示該物件是否在模型中,也就是尚未從模型中移除。 |
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
方法
擴充方法
| 名稱 | Description |
|---|---|
| AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean) |
為物件添加註解。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetAnnotation(IConventionAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean) |
設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 |