ITypeBase Interface

Definition

Represents a type in the model.

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

Remarks

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

Properties

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

Shadow types are not currently supported in a model that is used at runtime with a DbContext. Therefore, shadow types will only exist in migration model snapshots, etc.

ConstructorBinding

Gets the InstantiationBinding for the preferred constructor.

ContainingEntityType

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

HasSharedClrType

Gets whether this entity type can share its ClrType with other entities.

IsPropertyBag

Gets whether this entity type has an indexer which is able to contain arbitrary properties.

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

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

Gets the friendly display name for this structural type.

(Inherited from IReadOnlyTypeBase)
DisplayName(Boolean)

Gets the friendly display name for the given IReadOnlyTypeBase.

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

FindIndexerPropertyInfo()

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

(Inherited from IReadOnlyTypeBase)
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 on the given type. Returns null if no property is found.

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 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

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

(Inherited from IReadOnlyTypeBase)
GetComplexProperties()

Gets the complex properties defined on this entity type.

GetDeclaredComplexProperties()

Gets the complex properties declared on this entity type.

GetDeclaredMembers()

Gets the members declared on this type.

GetDeclaredProperties()

Gets all non-navigation properties declared on this type.

GetDerivedComplexProperties()

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

GetDerivedProperties()

Gets all non-navigation properties declared on the types derived from this type.

GetFlattenedComplexProperties()

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

GetFlattenedDeclaredProperties()

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

GetFlattenedProperties()

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

GetMembers()

Gets the members defined on this type and base types.

GetNavigationAccessMode()

Gets the PropertyAccessMode being used for navigations of this type.

(Inherited from IReadOnlyTypeBase)
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)
GetProperties()

Gets the 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.

(Inherited from IReadOnlyTypeBase)
GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
GetSnapshottableMembers()

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

IsAbstract()

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

(Inherited from IReadOnlyTypeBase)
IsAssignableFrom(IReadOnlyTypeBase)

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

(Inherited from IReadOnlyTypeBase)
IsStrictlyDerivedFrom(IReadOnlyTypeBase)

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

(Inherited from IReadOnlyTypeBase)
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)
ShortName()

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

(Inherited from IReadOnlyTypeBase)

Extension Methods

DisplayName(ITypeBase)

Gets the friendly display name for the given ITypeBase.

FullName(ITypeBase)
Obsolete.

Gets the unique name for the given IReadOnlyTypeBase.

IsAbstract(ITypeBase)

Checks if this entity type represents an abstract type.

ShortName(ITypeBase)

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

AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

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.

GetNavigationAccessMode(ITypeBase)

Gets the PropertyAccessMode being used for navigations of this type.

Note that individual navigations can override this access mode. The value returned here will be used for any navigation for which no override has been specified.

GetPropertyAccessMode(ITypeBase)

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

Note that individual properties and navigations can override this access mode. The value returned here will be used for any property or navigation for which no override has been specified.

Applies to