Condividi tramite


AnnotatableBuilder<TMetadata,TModelBuilder> Class

Definition

A base type with a simple API surface for configuring a ConventionAnnotatable.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

[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}")>]
type AnnotatableBuilder<'Metadata, 'ModelBuilder (requires 'Metadata :> ConventionAnnotatable and 'ModelBuilder :> IConventionModelBuilder)> = class
    interface IConventionAnnotatableBuilder
Public MustInherit Class AnnotatableBuilder(Of TMetadata, TModelBuilder)
Implements IConventionAnnotatableBuilder

Type Parameters

TMetadata
TModelBuilder
Inheritance
AnnotatableBuilder<TMetadata,TModelBuilder>
Attributes
Implements

Remarks

See Implementation of database providers and extensions for more information and examples.

Constructors

AnnotatableBuilder<TMetadata,TModelBuilder>(TMetadata, TModelBuilder)

Creates a new instance of AnnotatableBuilder<TMetadata,TModelBuilder>

Properties

Metadata

Gets the item being configured.

ModelBuilder

Gets the model builder.

Methods

CanRemoveAnnotation(String, ConfigurationSource)

Returns a value indicating whether an annotation with the given name can be removed using this configuration source.

CanSetAnnotation(String, Object, ConfigurationSource)

Returns a value indicating whether an annotation with the given name and value can be set from this configuration source.

HasAnnotation(String, Object, ConfigurationSource)

Sets the annotation with given key and value on this object using given configuration source. Overwrites the existing annotation if an annotation with the specified name already exists.

HasNoAnnotation(String, ConfigurationSource)

Removes any annotation with the given name.

HasNonNullAnnotation(String, Object, ConfigurationSource)

Sets the annotation with given key and value on this object using given configuration source. Overwrites the existing annotation if an annotation with the specified name already exists. Removes the annotation if null value is specified.

MergeAnnotationsFrom(TMetadata, ConfigurationSource)

Copies all the configured annotations from the given object overwriting any existing ones.

MergeAnnotationsFrom(TMetadata)

Copies all the explicitly configured annotations from the given object overwriting any existing ones.

RemoveAnnotation(String, ConfigurationSource)
Obsolete.

Removes any annotation with the given name.

Explicit Interface Implementations

IConventionAnnotatableBuilder.CanRemoveAnnotation(String, Boolean)

Returns a value indicating whether an annotation with the given name can be removed using this configuration source.

IConventionAnnotatableBuilder.CanSetAnnotation(String, Object, Boolean)

Returns a value indicating whether an annotation with the given name and value can be set from this configuration source.

IConventionAnnotatableBuilder.HasAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource.

IConventionAnnotatableBuilder.HasNoAnnotation(String, Boolean)

Removes the annotation with the given name from this object.

IConventionAnnotatableBuilder.HasNonNullAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource. Removes the annotation if null value is specified.

IConventionAnnotatableBuilder.Metadata

Gets the annotatable item being configured.

IConventionAnnotatableBuilder.ModelBuilder

Gets the model builder.

Applies to