IConventionElementTypeBuilder Interface

Definition

Provides a simple API surface for configuring an IConventionElementType for a primitive collection from conventions.

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

public interface IConventionElementTypeBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
type IConventionElementTypeBuilder = interface
    interface IConventionAnnotatableBuilder
Public Interface IConventionElementTypeBuilder
Implements IConventionAnnotatableBuilder
Implements

Remarks

See Model building conventions for more information and examples.

Properties

Metadata

Gets the element type being configured.

ModelBuilder

Gets the model builder.

(Inherited from IConventionAnnotatableBuilder)

Methods

CanRemoveAnnotation(String, Boolean)

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

(Inherited from 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.

(Inherited from IConventionAnnotatableBuilder)
CanSetConversion(Type, Boolean)

Returns a value indicating whether the given type to convert values to and from can be configured for the elements from the current configuration source.

CanSetConversion(ValueConverter, Boolean)

Returns a value indicating whether the ValueConverter can be configured for the elements from the current configuration source.

CanSetConverter(Type, Boolean)

Returns a value indicating whether the ValueConverter can be configured for the elements from the current configuration source.

CanSetIsRequired(Nullable<Boolean>, Boolean)

Returns a value indicating whether this element requiredness can be configured from the current configuration source.

CanSetIsUnicode(Nullable<Boolean>, Boolean)

Returns a value indicating whether the elements can be configured as capable of persisting unicode characters from the current configuration source.

CanSetMaxLength(Nullable<Int32>, Boolean)

Returns a value indicating whether the maximum length of elements can be set from the current configuration source.

CanSetPrecision(Nullable<Int32>, Boolean)

Returns a value indicating whether the precision of elements can be set from the current configuration source.

CanSetScale(Nullable<Int32>, Boolean)

Returns a value indicating whether the scale of elements can be set from the current configuration source.

CanSetTypeMapping(CoreTypeMapping, Boolean)

Returns a value indicating whether the given CoreTypeMapping can be configured from the current configuration source.

CanSetValueComparer(Type, Boolean)

Returns a value indicating whether the given ValueComparer can be configured from the current configuration source.

CanSetValueComparer(ValueComparer, Boolean)

Returns a value indicating whether the given ValueComparer can be configured from the current configuration source.

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.

HasConversion(Type, Boolean)

Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database.

HasConversion(ValueConverter, Boolean)

Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database.

HasConverter(Type, Boolean)

Configures elements of the collection so their values are converted before writing to the database and converted back when reading from the database.

HasMaxLength(Nullable<Int32>, Boolean)

Configures the maximum length of data that can be stored in elements of the collection.

HasNoAnnotation(String, Boolean)

Removes the annotation with the given name from this object.

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.

HasPrecision(Nullable<Int32>, Boolean)

Configures the precision of elements of the collection.

HasScale(Nullable<Int32>, Boolean)

Configures the scale of elements of the collection.

HasTypeMapping(CoreTypeMapping, Boolean)

Configures the CoreTypeMapping for elements of the collection.

HasValueComparer(Type, Boolean)

Configures the ValueComparer for elements of the collection.

HasValueComparer(ValueComparer, Boolean)

Configures the ValueComparer for elements of the collection.

IsRequired(Nullable<Boolean>, Boolean)

Configures whether elements of the collection must have a value or can be null. An element can only be configured as non-required if it is based on a CLR type that can be assigned null.

IsUnicode(Nullable<Boolean>, Boolean)

Configures whether elements of the collection are capable of persisting unicode characters.

RemoveAnnotation(String, Boolean)
Obsolete.

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
SetOrRemoveAnnotation(String, Object, Boolean)
Obsolete.

Sets or removes the annotation stored under the given name.

(Inherited from IConventionAnnotatableBuilder)

Extension Methods

CanSetFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean)

Returns a value indicating whether the elements can be configured as being fixed length or not.

CanSetStoreType(IConventionElementTypeBuilder, String, Boolean)

Returns a value indicating whether the given data type can be set for the elements.

HasStoreType(IConventionElementTypeBuilder, String, Boolean)

Configures the data type of the elements of the collection.

IsFixedLength(IConventionElementTypeBuilder, Nullable<Boolean>, Boolean)

Configures the elements as capable of storing only fixed-length data, such as strings.

Applies to