IElementType Interface

Definition

Represents the elements of a collection property.

public interface IElementType : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyElementType
type IElementType = interface
    interface IReadOnlyElementType
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Interface IElementType
Implements IAnnotatable, IReadOnlyElementType
Derived
Implements

Remarks

See Modeling entity types and relationships for more information and examples.

Properties

ClrType

The type of elements in the collection.

(Inherited from IReadOnlyElementType)
CollectionProperty

Gets the collection property for which this represents the element.

IsNullable

Gets a value indicating whether elements of the collection can be null.

(Inherited from IReadOnlyElementType)
Item[String]

Gets the value of the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)

Methods

AddRuntimeAnnotation(String, Object)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
AnnotationsToDebugString(Int32)

Gets the debug string for all annotations declared on the object.

(Inherited from IReadOnlyAnnotatable)
FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
FindRuntimeAnnotation(String)

Gets the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
FindRuntimeAnnotationValue(String)

Gets the value of the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
FindTypeMapping()

Returns the type mapping for elements of the collection.

(Inherited from IReadOnlyElementType)
GetAnnotation(String)

Gets the annotation with the given name, throwing if it does not exist.

(Inherited from IReadOnlyAnnotatable)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from IReadOnlyAnnotatable)
GetJsonValueReaderWriter()

Gets the type of JsonValueReaderWriter<TValue> to use for elements of the collection.

(Inherited from IReadOnlyElementType)
GetMaxLength()

Gets the maximum length of data that is allowed in elements of the collection. For example, if the element type is a String then this is the maximum number of characters.

(Inherited from IReadOnlyElementType)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

Gets the value of the runtime annotation with the given name, adding it if one does not exist.

(Inherited from IAnnotatable)
GetPrecision()

Gets the precision of data that is allowed in elements of the collection. For example, if the element type is a Decimal, then this is the maximum number of digits.

(Inherited from IReadOnlyElementType)
GetProviderClrType()

Gets the type that the elements of the collection will be converted to before being sent to the database provider.

(Inherited from IReadOnlyElementType)
GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
GetScale()

Gets the scale of data that is allowed in this elements of the collection. For example, if the element type is a Decimal, then this is the maximum number of decimal places.

(Inherited from IReadOnlyElementType)
GetTypeMapping()

Returns the CoreTypeMapping for the elements of the collection from a finalized model.

(Inherited from IReadOnlyElementType)
GetValueComparer()

Gets the custom ValueComparer for elements of the collection.

(Inherited from IReadOnlyElementType)
GetValueConverter()

Gets the custom ValueConverter for this elements of the collection.

(Inherited from IReadOnlyElementType)
IsUnicode()

Gets a value indicating whether elements of the collection can persist Unicode characters.

(Inherited from IReadOnlyElementType)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetRuntimeAnnotation(String, Object)

Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

(Inherited from IReadOnlyElementType)

Extension Methods

FindRelationalTypeMapping(IReadOnlyElementType)

Returns the RelationalTypeMapping for the given element on a finalized model.

GetRelationalTypeMapping(IReadOnlyElementType)

Returns the RelationalTypeMapping for the given element on a finalized model.

GetStoreType(IElementType)

Returns the database type of the elements.

GetStoreType(IReadOnlyElementType)

Returns the database type of the elements, or null if the database type could not be found.

IsFixedLength(IReadOnlyElementType)

Returns a flag indicating whether the elements are capable of storing only fixed-length data, such as strings.

IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier)

Returns a flag indicating whether the elements are capable of storing only fixed-length data, such as strings.

Applies to