Share via


IReadOnlyTypeBase Interface

Definition

Represents a structural type in the model.

public interface IReadOnlyTypeBase : Microsoft.EntityFrameworkCore.Infrastructure.IReadOnlyAnnotatable
type IReadOnlyTypeBase = interface
    interface IReadOnlyAnnotatable
Public Interface IReadOnlyTypeBase
Implements IReadOnlyAnnotatable
Derived
Implements

Remarks

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

Properties

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

ContainingEntityType

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

HasSharedClrType

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

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.

Item[String]

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

(Inherited from IReadOnlyAnnotatable)
Model

Gets the model that this type belongs to.

Name

Gets the name of this type.

Methods

Name Description
AnnotationsToDebugString(Int32)

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

(Inherited from IReadOnlyAnnotatable)
DisplayName()

Gets the friendly display name for this structural type.

DisplayName(Boolean)

Gets the friendly display name for the given IReadOnlyTypeBase.

FindAnnotation(String)

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

(Inherited from IReadOnlyAnnotatable)
FindComplexProperty(MemberInfo)

Gets a complex property with the given member info. Returns null if no property is found.

FindComplexProperty(String)

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

FindDeclaredComplexProperty(String)

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

FindDeclaredProperty(String)

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

FindDiscriminatorProperty()

Returns the property that will be used for storing a discriminator value.

FindIndexerPropertyInfo()

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

FindMember(String)

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

FindMembersInHierarchy(String)

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

FindProperties(IReadOnlyList<String>)

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

FindProperty(MemberInfo)

Gets a property with the given member info. Returns null if no property is found.

FindProperty(String)

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

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

GetComplexProperties()

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

GetDeclaredComplexProperties()

Gets the complex properties declared on this type.

GetDeclaredMembers()

Gets the members declared on this type.

GetDeclaredProperties()

Gets all scalar properties declared on this type.

GetDefaultDiscriminatorValue()

Returns the default discriminator value that would be used for this type.

GetDerivedComplexProperties()

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

GetDerivedProperties()

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

GetDerivedTypes()

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

GetDerivedTypesInclusive()

Returns all derived types of this type, including the type itself.

GetDirectlyDerivedTypes()

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

GetDiscriminatorPropertyName()

Returns the name of the property that will be used for storing a discriminator value.

GetDiscriminatorValue()

Returns the discriminator value for this type.

GetMembers()

Gets the members defined on this type and base types.

GetNavigationAccessMode()

Gets the PropertyAccessMode being used for navigations of this type.

GetOrCreateEmptyMaterializer(IStructuralTypeMaterializerSource)

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.

GetOrCreateMaterializer(IStructuralTypeMaterializerSource)

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.

GetProperties()

Gets all scalar properties defined on this type.

GetProperty(String)

Gets a property with the given name.

GetPropertyAccessMode()

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

GetRootType()

Gets the root base type for a given entity type.

IsAbstract()

Gets a value indicating whether this structural type represents an abstract type.

IsAssignableFrom(IReadOnlyTypeBase)

Determines if this type derives from (or is the same as) a given type.

IsStrictlyDerivedFrom(IReadOnlyTypeBase)

Determines if this type derives from (but is not the same as) a given type.

ShortName()

Gets a short name for the given IReadOnlyTypeBase that can be used in other identifiers.

Extension Methods

Name Description
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.

GetContainerColumnName(IReadOnlyTypeBase)

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

GetContainerColumnType(IReadOnlyTypeBase)

Gets the column type to use for the container column to which the type is mapped.

GetDeleteStoredProcedure(IReadOnlyTypeBase)

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

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.

GetJsonPropertyName(IReadOnlyTypeBase)

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

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

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.

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.

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