IConventionAnnotatable 介面

定義

類別,公開可修改的批註。 注釋允許將任意中繼資料儲存在 物件上。

資料庫提供者通常會使用這個介面, (和其他延伸模組) 。 它通常不會用於應用程式程式碼。

public interface IConventionAnnotatable : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable
public interface IConventionAnnotatable : Microsoft.EntityFrameworkCore.Infrastructure.IReadOnlyAnnotatable
type IConventionAnnotatable = interface
    interface IAnnotatable
type IConventionAnnotatable = interface
    interface IReadOnlyAnnotatable
Public Interface IConventionAnnotatable
Implements IAnnotatable
Public Interface IConventionAnnotatable
Implements IReadOnlyAnnotatable
衍生
實作

備註

如需詳細資訊和範例,請參閱 模型建置慣例

屬性

Builder

取得可用來設定這個物件的產生器。

IsInModel

指出此物件是否在模型中,亦即尚未從其中移除。

Item[String]

取得具有指定名稱的注釋值,如果不存在,則傳 null 回 。

(繼承來源 IReadOnlyAnnotatable)

方法

AddAnnotation(String, Object, Boolean)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

將批註加入物件。

AddRuntimeAnnotation(String, Object)

將執行時間批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

取得 物件上宣告之所有批註的偵錯字串。

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

FindRuntimeAnnotation(String)

取得具有指定名稱的執行時間批註,如果不存在,則傳 null 回 。

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

取得具有指定名稱的執行時間批註值,如果不存在,則傳 null 回 。

(繼承來源 IAnnotatable)
GetAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

GetAnnotations()

取得目前 物件上的所有批註。

GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得具有指定名稱的執行時間注釋值,如果不存在,請加以新增。

(繼承來源 IAnnotatable)
GetRuntimeAnnotations()

取得目前 物件上的所有執行時間批註。

(繼承來源 IAnnotatable)
RemoveAnnotation(String)

從這個 物件中移除具有指定名稱的批註。

RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

(繼承來源 IAnnotatable)
SetAnnotation(String, Object, Boolean)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

SetOrRemoveAnnotation(String, Object, Boolean)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

SetRuntimeAnnotation(String, Object)

設定儲存在指定索引鍵下的執行時間批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 IAnnotatable)

擴充方法

AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

將批註加入物件。

GetAnnotation(IConventionAnnotatable, String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

AnnotationsToDebugString(IAnnotatable, Int32)

取得 物件上宣告之所有批註的偵錯字串。

GetAnnotation(IAnnotatable, String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

適用於