RuntimeElementType Class

Definition

Represents the elements of a collection property.

public class RuntimeElementType : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.IElementType
type RuntimeElementType = class
    inherit AnnotatableBase
    interface IElementType
    interface IReadOnlyElementType
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeElementType
Inherits AnnotatableBase
Implements IElementType
Inheritance
RuntimeElementType
Implements

Remarks

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

Constructors

RuntimeElementType(Type, RuntimeProperty, Boolean, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Type, ValueConverter, ValueComparer, JsonValueReaderWriter, CoreTypeMapping)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

ClrType

The type of elements in the collection.

CollectionProperty

Gets the collection property for which this represents the element.

DebugView

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

IsNullable

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

IsReadOnly

Indicates whether the current object is read-only.

(Inherited from AnnotatableBase)
Item[String]

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

(Inherited from AnnotatableBase)

Methods

AddAnnotation(String, Annotation)

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

(Inherited from AnnotatableBase)
AddAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
AddAnnotations(IEnumerable<IAnnotation>)

Adds annotations to this object.

(Inherited from AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

Adds annotations to this object.

(Inherited from AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

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

(Inherited from AnnotatableBase)
AddRuntimeAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

Adds runtime annotations to this object.

(Inherited from AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

Adds runtime annotations to this object.

(Inherited from AnnotatableBase)
CreateAnnotation(String, Object)

Creates a new annotation.

(Inherited from AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

Creates a new runtime annotation.

(Inherited from AnnotatableBase)
EnsureMutable()

Throws if the model is read-only.

(Inherited from AnnotatableBase)
EnsureReadOnly()

Throws if the model is not read-only.

(Inherited from AnnotatableBase)
FindAnnotation(String)

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

(Inherited from AnnotatableBase)
FindRuntimeAnnotation(String)

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

(Inherited from AnnotatableBase)
FindTypeMapping()

Returns the type mapping for elements of the collection.

GetAnnotation(String)

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

(Inherited from AnnotatableBase)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from AnnotatableBase)
GetJsonValueReaderWriter()

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

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.

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 AnnotatableBase)
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.

GetProviderClrType()

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

GetRuntimeAnnotations()

Gets all runtime annotations on the current object.

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

GetValueComparer()

Gets the custom ValueComparer for elements of the collection.

GetValueConverter()

Gets the custom ValueConverter for this elements of the collection.

IsUnicode()

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

OnAnnotationSet(String, Annotation, Annotation)

Called when an annotation was set or removed.

(Inherited from AnnotatableBase)
RemoveAnnotation(String)

Removes the given annotation from this object.

(Inherited from AnnotatableBase)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from AnnotatableBase)
SetAnnotation(String, Annotation, Annotation)

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

(Inherited from AnnotatableBase)
SetAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

(Inherited from AnnotatableBase)
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 AnnotatableBase)
ToString()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Explicit Interface Implementations

IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(Inherited from AnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(Inherited from AnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from AnnotatableBase)
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 AnnotatableBase)
IReadOnlyAnnotatable.FindAnnotation(String)

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

(Inherited from AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

Gets all annotations on the current object.

(Inherited from AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(Inherited from AnnotatableBase)
IReadOnlyElementType.CollectionProperty

Gets the collection property for which this represents the element.

IReadOnlyElementType.FindTypeMapping()

Returns the type mapping for elements of the collection.

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.

IReadOnlyElementType.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.

IReadOnlyElementType.GetProviderClrType()

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

IReadOnlyElementType.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.

IReadOnlyElementType.GetValueConverter()

Gets the custom ValueConverter for this elements of the collection.

IReadOnlyElementType.IsNullable

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

IReadOnlyElementType.IsUnicode()

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

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