RuntimeComplexType Class

Definition

Represents the type of a complex property of a structural type.

public class RuntimeComplexType : Microsoft.EntityFrameworkCore.Metadata.RuntimeTypeBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeComplexType
type RuntimeComplexType = class
    inherit RuntimeTypeBase
    interface IRuntimeComplexType
    interface IComplexType
    interface IReadOnlyComplexType
    interface IReadOnlyTypeBase
    interface IReadOnlyAnnotatable
    interface ITypeBase
    interface IAnnotatable
    interface IRuntimeTypeBase
Public Class RuntimeComplexType
Inherits RuntimeTypeBase
Implements IRuntimeComplexType
Inheritance
Implements
IAnnotatable IReadOnlyAnnotatable IComplexType Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeComplexType Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeTypeBase IReadOnlyComplexType IReadOnlyTypeBase ITypeBase

Remarks

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

Constructors

RuntimeComplexType(String, Type, RuntimeComplexProperty, ChangeTrackingStrategy, PropertyInfo, Boolean)

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

BaseType

Gets the base type of this type. Returns null if this is not a derived type in an inheritance hierarchy.

(Inherited from RuntimeTypeBase)
ClrType

Gets the CLR class that is used to represent instances of this type. Returns null if the type does not have a corresponding CLR class (known as a shadow type).

(Inherited from RuntimeTypeBase)
ComplexProperty

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.

ConstructorBinding

Gets or sets the InstantiationBinding for the preferred constructor.

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.

DirectlyDerivedTypes

Gets all types in the model that directly derive from this type.

(Inherited from RuntimeTypeBase)
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)
Model

Gets the model that this type belongs to.

(Inherited from RuntimeTypeBase)
Name

Gets the name of this type.

(Inherited from RuntimeTypeBase)
Properties

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.

(Inherited from RuntimeTypeBase)
ServiceOnlyConstructorBinding

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.

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)
AddComplexProperty(String, Type, String, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean, ChangeTrackingStrategy, PropertyInfo, Boolean)

Adds a complex property to this entity type.

(Inherited from RuntimeTypeBase)
AddProperty(String, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean, ValueGenerated, PropertySaveBehavior, PropertySaveBehavior, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Type, Func<IProperty,ITypeBase,ValueGenerator>, ValueConverter, ValueComparer, ValueComparer, ValueComparer, JsonValueReaderWriter, CoreTypeMapping, Object)

Adds a property to this entity type.

(Inherited from RuntimeTypeBase)
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)
FindComplexPropertiesInHierarchy(String)

Gets the complex properties with the given name on this type, base types or derived types.

(Inherited from RuntimeTypeBase)
FindComplexProperty(String)

Gets the complex property with a given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
FindDeclaredProperty(String)

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.

(Inherited from RuntimeTypeBase)
FindIndexerPropertyInfo()

Returns the PropertyInfo for the indexer on the associated CLR type if one exists.

(Inherited from RuntimeTypeBase)
FindMember(String)

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.

FindMembersInHierarchy(String)

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.

FindProperties(IEnumerable<String>)

Finds matching properties on the given entity type. Returns null if any property is not found.

(Inherited from RuntimeTypeBase)
FindPropertiesInHierarchy(String)

Gets the properties with the given name on this type, base types or derived types.

(Inherited from RuntimeTypeBase)
FindProperty(String)

Gets the property with a given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
FindRuntimeAnnotation(String)

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

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

Gets the complex properties defined on this type.

(Inherited from RuntimeTypeBase)
GetDeclaredComplexProperties()

Gets the complex properties declared on this type.

(Inherited from RuntimeTypeBase)
GetDeclaredMembers()

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.

GetDeclaredProperties()

Gets all scalar properties declared on this type.

(Inherited from RuntimeTypeBase)
GetDerivedTypes()

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.

(Inherited from RuntimeTypeBase)
GetDerivedTypes<T>()

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.

(Inherited from RuntimeTypeBase)
GetFlattenedComplexProperties()

Returns all RuntimeComplexProperty members from this type and all nested complex types, if any.

(Inherited from RuntimeTypeBase)
GetFlattenedDeclaredProperties()

Returns all IProperty members from this type and all nested complex types, if any.

(Inherited from RuntimeTypeBase)
GetFlattenedProperties()

Returns all IProperty members from this type and all nested complex types, if any.

(Inherited from RuntimeTypeBase)
GetMembers()

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.

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)
GetProperties()

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.

(Inherited from RuntimeTypeBase)
GetRuntimeAnnotations()

Gets all runtime annotations on the current object.

(Inherited from AnnotatableBase)
GetSnapshottableMembers()

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.

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()

Returns a string that represents the current object.

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)
IComplexType.ComplexProperty

Gets the associated property.

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)
IReadOnlyComplexType.ComplexProperty

Gets the associated property.

IReadOnlyTypeBase.ContainingEntityType

Gets this entity type or the one on which the complex property chain is declared.

IReadOnlyTypeBase.FindComplexProperty(String)

Gets the complex property with the given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindDeclaredComplexProperty(String)

Finds a property declared on the type with the given name. Does not return properties defined on a base type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindDeclaredProperty(String)

Finds a property declared on the type with the given name. Does not return properties defined on a base type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindMember(String)

Gets the member with the given name. Returns null if no member with the given name is defined.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindMembersInHierarchy(String)

Gets the members with the given name on this type, base types or derived types.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindProperties(IReadOnlyList<String>)

Finds matching properties on the given type. Returns null if any property is not found.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.FindProperty(String)

Gets the property with the given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetChangeTrackingStrategy()

Gets the change tracking strategy being used for this type. This strategy indicates how the context detects changes to properties for an instance of the type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetComplexProperties()

Gets the complex properties defined on this type and base types.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetDeclaredComplexProperties()

Gets the complex properties declared on this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetDeclaredMembers()

Gets the members declared on this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetDeclaredProperties()

Gets all scalar properties declared on this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetDerivedComplexProperties()

Gets the complex properties declared on the types derived from this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetDerivedProperties()

Gets all scalar properties declared on the types derived from this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetMembers()

Gets the members defined on this type and base types.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetProperties()

Gets all scalar properties defined on this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.GetPropertyAccessMode()

Gets the PropertyAccessMode being used for properties and navigations of this type.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.HasSharedClrType

Gets a value indicating whether this structural type is mapped to a Type that other structural types are also mapped to.

IReadOnlyTypeBase.IsPropertyBag

Gets a value indicating whether this structural type has an indexer which is able to contain arbitrary properties and a method that can be used to determine whether a given indexer property contains a value.

(Inherited from RuntimeTypeBase)
IReadOnlyTypeBase.Model

Gets the model that this type belongs to.

IRuntimeTypeBase.GetConstructorBindingConfigurationSource() (Inherited from RuntimeTypeBase)
IRuntimeTypeBase.GetServiceOnlyConstructorBindingConfigurationSource() (Inherited from RuntimeTypeBase)
ITypeBase.ContainingEntityType Microsoft.EntityFrameworkCore.Metadata.IComplexType.Microsoft.EntityFrameworkCore.Metadata.ITypeBase.ContainingEntityType
ITypeBase.FindComplexProperty(String)

Gets the complex property with a given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
ITypeBase.FindDeclaredProperty(String)

Finds a property declared on the type with the given name. Does not return properties defined on a base type.

(Inherited from RuntimeTypeBase)
ITypeBase.FindMember(String)

Gets the member with the given name. Returns null if no member with the given name is defined.

(Inherited from RuntimeTypeBase)
ITypeBase.FindMembersInHierarchy(String)

Gets the members with the given name on this type, base types or derived types..

(Inherited from RuntimeTypeBase)
ITypeBase.FindProperty(String)

Gets the property with a given name. Returns null if no property with the given name is defined.

(Inherited from RuntimeTypeBase)
ITypeBase.GetComplexProperties()

Gets the complex properties defined on this entity type.

(Inherited from RuntimeTypeBase)
ITypeBase.GetDeclaredComplexProperties()

Gets the complex properties declared on this entity type.

(Inherited from RuntimeTypeBase)
ITypeBase.GetDeclaredMembers()

Gets the members declared on this type.

(Inherited from RuntimeTypeBase)
ITypeBase.GetDeclaredProperties()

Gets all non-navigation properties declared on this type.

(Inherited from RuntimeTypeBase)
ITypeBase.GetFlattenedComplexProperties()

Returns all properties that implement IComplexProperty, including those on complex types.

(Inherited from RuntimeTypeBase)
ITypeBase.GetFlattenedDeclaredProperties()

Returns all properties declared properties that implement IProperty, including those on complex types.

(Inherited from RuntimeTypeBase)
ITypeBase.GetFlattenedProperties()

Returns all properties that implement IProperty, including those on complex types.

(Inherited from RuntimeTypeBase)
ITypeBase.GetMembers()

Gets the members defined on this type and base types.

(Inherited from RuntimeTypeBase)
ITypeBase.GetProperties()

Gets the properties defined on this type.

(Inherited from RuntimeTypeBase)
ITypeBase.GetSnapshottableMembers()

Returns all members that may need a snapshot value when change tracking.

(Inherited from RuntimeTypeBase)
ITypeBase.Model

Gets the model that this type belongs to.

Extension Methods

GetContainerColumnName(IReadOnlyComplexType)

Gets the container column name to which the complex type is mapped.

FindMappingFragment(IReadOnlyTypeBase, StoreObjectIdentifier)

Returns the type mapping for a particular table-like store object.

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

FindMappingFragment(ITypeBase, StoreObjectIdentifier)

Returns the type mapping for a particular table-like store object.

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

GetContainerColumnName(IReadOnlyTypeBase)

Gets the container column name to which the type is mapped.

GetDefaultMappings(ITypeBase)

Returns the default mappings that the type would use.

GetDeleteStoredProcedure(IReadOnlyTypeBase)

Returns the stored procedure to which the type is mapped for deletes or null if not mapped to a stored procedure.

GetDeleteStoredProcedure(ITypeBase)

Returns the stored procedure to which the type is mapped for deletes or null if not mapped to a stored procedure.

GetDeleteStoredProcedureMappings(ITypeBase)

Returns the delete stored procedures to which the type is mapped.

GetFunctionMappings(ITypeBase)

Returns the functions to which the type is mapped.

GetFunctionName(IReadOnlyTypeBase)

Returns the name of the function to which the type is mapped or null if not mapped to a function.

GetInsertStoredProcedure(IReadOnlyTypeBase)

Returns the stored procedure to which the type is mapped for inserts or null if not mapped to a stored procedure.

GetInsertStoredProcedure(ITypeBase)

Returns the stored procedure to which the type is mapped for inserts or null if not mapped to a stored procedure.

GetInsertStoredProcedureMappings(ITypeBase)

Returns the insert stored procedures to which the type is mapped.

GetJsonPropertyName(IReadOnlyTypeBase)

Gets the value of JSON property name used for the given entity mapped to a JSON column.

GetMappingFragments(IReadOnlyTypeBase)

Returns all configured type mapping fragments.

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

GetMappingFragments(IReadOnlyTypeBase, StoreObjectType)

Returns all configured type mapping fragments of the given type.

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

GetMappingFragments(ITypeBase)

Returns all configured type mapping fragments.

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

GetMappingFragments(ITypeBase, StoreObjectType)

Returns all configured type mapping fragments of the given type.

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

GetMappingStrategy(IReadOnlyTypeBase)

Gets the mapping strategy for the derived types.

GetSchema(IReadOnlyTypeBase)

Returns the database schema that contains the mapped table.

GetSqlQuery(IReadOnlyTypeBase)

Returns the SQL string used to provide data for the type or null if not mapped to a SQL string.

GetSqlQueryMappings(ITypeBase)

Returns the SQL string mappings.

GetTableMappings(ITypeBase)

Returns the tables to which the type is mapped.

GetTableName(IReadOnlyTypeBase)

Returns the name of the table to which the type is mapped or null if not mapped to a table.

GetUpdateStoredProcedure(IReadOnlyTypeBase)

Returns the stored procedure to which the type is mapped for updates or null if not mapped to a stored procedure.

GetUpdateStoredProcedure(ITypeBase)

Returns the stored procedure to which the type is mapped for updates or null if not mapped to a stored procedure.

GetUpdateStoredProcedureMappings(ITypeBase)

Returns the update stored procedures to which the type is mapped.

GetViewMappings(ITypeBase)

Returns the views to which the type is mapped.

GetViewName(IReadOnlyTypeBase)

Returns the name of the view to which the type is mapped or null if not mapped to a view.

GetViewSchema(IReadOnlyTypeBase)

Returns the database schema that contains the mapped view.

IsMappedToJson(IReadOnlyTypeBase)

Gets a value indicating whether the specified entity is mapped to a JSON column.

Applies to