語言

AnnotatableBuilder<TMetadata,TModelBuilder> 類別

定義

一個基底型別,帶有簡單的 API 表面用於配置。ConventionAnnotatable

此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。

[System.Diagnostics.DebuggerDisplay("Builder {Metadata,nq}")]
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class AnnotatableBuilder<TMetadata,TModelBuilder> : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder where TMetadata : ConventionAnnotatable where TModelBuilder : IConventionModelBuilder
[System.Diagnostics.DebuggerDisplay("Builder {Metadata,nq}")]
public abstract class AnnotatableBuilder<TMetadata,TModelBuilder> : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder where TMetadata : ConventionAnnotatable where TModelBuilder : IConventionModelBuilder
[<System.Diagnostics.DebuggerDisplay("Builder {Metadata,nq}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type AnnotatableBuilder<'Metadata, 'ModelBuilder (requires 'Metadata :> ConventionAnnotatable and 'ModelBuilder :> IConventionModelBuilder)> = class
    interface IConventionAnnotatableBuilder
[<System.Diagnostics.DebuggerDisplay("Builder {Metadata,nq}")>]
type AnnotatableBuilder<'Metadata, 'ModelBuilder (requires 'Metadata :> ConventionAnnotatable and 'ModelBuilder :> IConventionModelBuilder)> = class
    interface IConventionAnnotatableBuilder
Public MustInherit Class AnnotatableBuilder(Of TMetadata, TModelBuilder)
Implements IConventionAnnotatableBuilder

類型參數

TMetadata
TModelBuilder
繼承
AnnotatableBuilder<TMetadata,TModelBuilder>
屬性
實作

備註

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

建構函式

名稱 Description
AnnotatableBuilder<TMetadata,TModelBuilder>(TMetadata, TModelBuilder)

建立一個新的 實例 AnnotatableBuilder<TMetadata,TModelBuilder>

屬性

名稱 Description
Metadata

能完成正在設定的項目。

ModelBuilder

會得到模型製作者。

方法

名稱 Description
CanRemoveAnnotation(String, ConfigurationSource)

回傳一個值,指示是否能使用此組態來源移除帶有該名稱的註解。

CanSetAnnotation(String, Object, ConfigurationSource)

回傳一個值,指示是否能從此配置來源設定包含該名稱與值的註解。

HasAnnotation(String, Object, ConfigurationSource)

利用給定的設定來源,將該物件的註解設定為特定的鍵與值。 若已有指定名稱的註解存在,則會覆寫現有註解。

HasNoAnnotation(String, ConfigurationSource)

移除所有帶有名字的註解。

HasNonNullAnnotation(String, Object, ConfigurationSource)

利用給定的設定來源,將該物件的註解設定為特定的鍵與值。 若已有指定名稱的註解存在,則會覆寫現有註解。 若指定值, null 則移除註解。

MergeAnnotationsFrom(TMetadata, ConfigurationSource)

複製給定物件中所有已設定的註解,並覆寫現有的註解。

MergeAnnotationsFrom(TMetadata)

複製所有明確設定的標註,覆蓋現有的標註。

RemoveAnnotation(String, ConfigurationSource)
已淘汰.

移除所有帶有名字的註解。

明確介面實作

名稱 Description
IConventionAnnotatableBuilder.CanRemoveAnnotation(String, Boolean)

回傳一個值,指示是否能使用此組態來源移除帶有該名稱的註解。

IConventionAnnotatableBuilder.CanSetAnnotation(String, Object, Boolean)

回傳一個值,指示是否能從此配置來源設定包含該名稱與值的註解。

IConventionAnnotatableBuilder.HasAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 ConfigurationSource的標註,則會覆寫現有註解。

IConventionAnnotatableBuilder.HasNoAnnotation(String, Boolean)

移除這個物件中帶有名字的註解。

IConventionAnnotatableBuilder.HasNonNullAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 ConfigurationSource的標註,則會覆寫現有註解。 若指定值, null 則移除註解。

IConventionAnnotatableBuilder.Metadata

取得正在設定的可標註項目。

IConventionAnnotatableBuilder.ModelBuilder

會得到模型製作者。

適用於