IConventionTypeBase Interface

Definition

Represents a type in an IConventionModel.

This interface is used during model creation and allows the metadata to be modified. Once the model is built, IReadOnlyTypeBase represents a read-only view of the same metadata.

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

Remarks

See Model building conventions for more information.

Properties

Builder

Gets the builder that can be used to configure this object.

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

(Inherited from IReadOnlyTypeBase)
HasSharedClrType

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

(Inherited from IReadOnlyTypeBase)
IsInModel

Indicates whether this object is in a model, i.e. hasn't been removed from one.

(Inherited from IConventionAnnotatable)
IsPropertyBag

Gets a value indicating whether this entity 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 IReadOnlyTypeBase)
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.

(Inherited from IReadOnlyTypeBase)

Methods

AddAnnotation(String, Object, Boolean)

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

(Inherited from IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

Adds annotations to an object.

(Inherited from IConventionAnnotatable)
AddIgnored(String, Boolean)

Marks the given member name as ignored, preventing conventions from adding a matching property or navigation to the type.

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 the given IReadOnlyTypeBase.

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

Indicates whether the given member name is ignored.

FindIndexerPropertyInfo()

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

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

Gets all the ignored members.

GetNavigationAccessMode()

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.

(Inherited from IReadOnlyTypeBase)
GetNavigationAccessModeConfigurationSource()

Returns the configuration source for GetNavigationAccessMode().

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

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.

(Inherited from IReadOnlyTypeBase)
GetPropertyAccessModeConfigurationSource()

Returns the configuration source for GetPropertyAccessMode().

GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
IsAbstract()

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

(Inherited from IReadOnlyTypeBase)
IsIgnored(String)

Indicates whether the given member name is ignored.

RemoveAnnotation(String)

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatable)
RemoveIgnored(String)

Removes the ignored member name.

RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetAnnotation(String, Object, Boolean)

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

(Inherited from IConventionAnnotatable)
SetNavigationAccessMode(Nullable<PropertyAccessMode>, Boolean)

Sets the PropertyAccessMode to use for navigations of this entity type.

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

SetOrRemoveAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists. Removes the existing annotation if null is supplied.

(Inherited from IConventionAnnotatable)
SetPropertyAccessMode(Nullable<PropertyAccessMode>, Boolean)

Sets the PropertyAccessMode to use for properties of this type.

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

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

AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

Adds annotations to an object.

GetAnnotation(IConventionAnnotatable, String)

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

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists. Removes the existing annotation if null is supplied.

GetNavigationAccessModeConfigurationSource(IConventionTypeBase)

Returns the configuration source for GetNavigationAccessMode(ITypeBase).

GetPropertyAccessModeConfigurationSource(IConventionTypeBase)

Returns the configuration source for GetPropertyAccessMode(ITypeBase).

IsIgnored(IConventionTypeBase, String)

Indicates whether the given member name is ignored.

SetNavigationAccessMode(IConventionTypeBase, Nullable<PropertyAccessMode>, Boolean)

Sets the PropertyAccessMode to use for navigations of this entity type.

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

SetPropertyAccessMode(IConventionTypeBase, Nullable<PropertyAccessMode>, Boolean)

Sets the PropertyAccessMode to use for properties of this type.

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

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.

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