RuntimeTypeBase Class

Definition

Represents a structural type in a model.

public abstract class RuntimeTypeBase : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeTypeBase
type RuntimeTypeBase = class
    inherit AnnotatableBase
    interface IRuntimeTypeBase
    interface ITypeBase
    interface IReadOnlyTypeBase
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public MustInherit Class RuntimeTypeBase
Inherits AnnotatableBase
Implements IRuntimeTypeBase
Inheritance
RuntimeTypeBase
Derived
Implements
IAnnotatable IReadOnlyAnnotatable Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeTypeBase IReadOnlyTypeBase ITypeBase

Remarks

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

Constructors

RuntimeTypeBase(String, Type, RuntimeModel, RuntimeTypeBase, 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.

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

ConstructorBinding

Gets or sets the InstantiationBinding for the preferred constructor.

DirectlyDerivedTypes

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

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.

Name

Gets the name of this type.

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.

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.

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.

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.

FindComplexProperty(String)

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

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.

FindIndexerProperty(Type)

Returns the default indexer property that takes a String value if one exists.

FindIndexerPropertyInfo()

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

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.

FindPropertiesInHierarchy(String)

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

FindProperty(String)

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

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.

GetDeclaredComplexProperties()

Gets the complex properties declared on this type.

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.

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.

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.

GetFlattenedComplexProperties()

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

GetFlattenedDeclaredProperties()

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

GetFlattenedProperties()

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

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.

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)
ToEnumerable<T>(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.

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)
IReadOnlyTypeBase.FindComplexProperty(String)

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

IReadOnlyTypeBase.FindDeclaredComplexProperty(String)

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

IReadOnlyTypeBase.FindDeclaredProperty(String)

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

IReadOnlyTypeBase.FindMember(String)

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

IReadOnlyTypeBase.FindMembersInHierarchy(String)

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

IReadOnlyTypeBase.FindProperties(IReadOnlyList<String>)

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

IReadOnlyTypeBase.FindProperty(String)

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

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.

IReadOnlyTypeBase.GetComplexProperties()

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

IReadOnlyTypeBase.GetDeclaredComplexProperties()

Gets the complex properties declared on this type.

IReadOnlyTypeBase.GetDeclaredMembers()

Gets the members declared on this type.

IReadOnlyTypeBase.GetDeclaredProperties()

Gets all scalar properties declared on this type.

IReadOnlyTypeBase.GetDerivedComplexProperties()

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

IReadOnlyTypeBase.GetDerivedProperties()

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

IReadOnlyTypeBase.GetMembers()

Gets the members defined on this type and base types.

IReadOnlyTypeBase.GetProperties()

Gets all scalar properties defined on this type.

IReadOnlyTypeBase.GetPropertyAccessMode()

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

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.

IReadOnlyTypeBase.Model

Gets the model that this type belongs to.

IRuntimeTypeBase.GetConstructorBindingConfigurationSource() Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeTypeBase.GetConstructorBindingConfigurationSource
IRuntimeTypeBase.GetServiceOnlyConstructorBindingConfigurationSource() Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeTypeBase.GetServiceOnlyConstructorBindingConfigurationSource
ITypeBase.FindComplexProperty(String)

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

ITypeBase.FindDeclaredProperty(String)

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

ITypeBase.FindMember(String)

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

ITypeBase.FindMembersInHierarchy(String)

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

ITypeBase.FindProperty(String)

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

ITypeBase.GetComplexProperties()

Gets the complex properties defined on this entity type.

ITypeBase.GetDeclaredComplexProperties()

Gets the complex properties declared on this entity type.

ITypeBase.GetDeclaredMembers()

Gets the members declared on this type.

ITypeBase.GetDeclaredProperties()

Gets all non-navigation properties declared on this type.

ITypeBase.GetFlattenedComplexProperties()

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

ITypeBase.GetFlattenedDeclaredProperties()

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

ITypeBase.GetFlattenedProperties()

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

ITypeBase.GetMembers()

Gets the members defined on this type and base types.

ITypeBase.GetProperties()

Gets the properties defined on this type.

ITypeBase.GetSnapshottableMembers()

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

ITypeBase.Model

Gets the model that this type belongs to.

Extension Methods

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