IConventionTypeBase 接口

定义

表示 中的 IConventionModel类型。

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
派生
实现

注解

此接口在模型创建期间使用,并允许修改元数据。 生成模型后, IReadOnlyTypeBase 表示相同元数据的只读视图。

有关详细信息和示例,请参阅 模型生成约定

属性

Builder

获取可用于配置此类型的生成器。

ClrType

获取用于表示此类型的实例的 CLR 类。 null如果类型没有相应的 CLR 类 (称为阴影类型) ,则返回 。

(继承自 IReadOnlyTypeBase)
ConstructorBinding

InstantiationBinding获取首选构造函数的 。

(继承自 ITypeBase)
ContainingEntityType

获取此实体类型或声明复杂属性链的实体类型。

HasSharedClrType

获取一个值,该值指示此结构类型是否映射到 Type 其他结构类型也映射到的 。

(继承自 IReadOnlyTypeBase)
IsInModel

指示此对象是否在模型中,即尚未从模型中删除。

(继承自 IConventionAnnotatable)
IsPropertyBag

获取一个值,该值指示此结构类型是否具有能够包含任意属性的索引器和可用于确定给定索引器属性是否包含值的方法。

(继承自 IReadOnlyTypeBase)
Item[String]

获取具有给定名称的批注的值,如果不存在,则返回 null

(继承自 IReadOnlyAnnotatable)
Model

获取此类型所属的模型。

Name

获取此类型的名称。

(继承自 IReadOnlyTypeBase)

方法

AddAnnotation(String, Object, Boolean)

向此对象添加批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 IConventionAnnotatable)
AddAnnotations(IEnumerable<IConventionAnnotation>, Boolean)

向 对象添加批注。

(继承自 IConventionAnnotatable)
AddComplexIndexerProperty(String, Type, Type, String, Boolean, Boolean)

向此类型添加由 和 索引器支持的属性。

AddComplexProperty(MemberInfo, String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Type, MemberInfo, Type, String, Boolean, Boolean)

向此类型添加属性。

AddComplexProperty(String, Type, Type, String, Boolean, Boolean)

向此类型添加属性。

AddIgnored(String, Boolean)

将给定的成员名称标记为忽略,从而阻止约定向类型添加匹配的属性或导航。

AddIndexerProperty(String, Type, Boolean, Boolean)

将 和 索引器支持的属性添加到此实体类型。

AddProperty(MemberInfo, Boolean)

向此实体类型添加属性。

AddProperty(String, Boolean)

向此实体类型添加属性。

AddProperty(String, Type, Boolean, Boolean)

向此实体类型添加属性。

AddProperty(String, Type, MemberInfo, Boolean, Boolean)

向此实体类型添加属性。

AddRuntimeAnnotation(String, Object)

向此对象添加运行时批注。 如果已存在具有指定名称的批注,则引发 。

(继承自 IAnnotatable)
AnnotationsToDebugString(Int32)

获取对象上声明的所有注释的调试字符串。

(继承自 IReadOnlyAnnotatable)
DisplayName()

获取此结构类型的友好显示名称。

(继承自 IReadOnlyTypeBase)
DisplayName(Boolean)

获取给定 IReadOnlyTypeBase的友好显示名称。

(继承自 IReadOnlyTypeBase)
FindAnnotation(String)

获取具有给定名称的批注,如果不存在,则返回 null

(继承自 IReadOnlyAnnotatable)
FindComplexProperty(MemberInfo)

获取具有给定成员信息的复杂属性。 null如果未找到任何属性,则返回 。

FindComplexProperty(String)

获取具有给定名称的复杂属性。 null如果未定义具有给定名称的属性,则返回 。

FindDeclaredComplexProperty(String)

查找在具有给定名称的类型上声明的属性。 不返回在基类型上定义的属性。

FindDeclaredProperty(String)

查找在具有给定名称的类型上声明的属性。 不返回在基类型上定义的属性。

FindIgnoredConfigurationSource(String)

指示是否忽略给定的成员名称。

FindIndexerPropertyInfo()

返回 PropertyInfo 关联 CLR 类型的索引器的 (如果存在)。

(继承自 IReadOnlyTypeBase)
FindMember(String)

获取具有给定名称的成员。 null如果未定义具有给定名称的成员,则返回 。

FindMembersInHierarchy(String)

获取此类型、基类型或派生类型上具有给定名称的成员。

FindProperties(IReadOnlyList<String>)

查找给定实体类型上的匹配属性。 null如果未找到任何属性,则返回 。

FindProperty(MemberInfo)

获取给定实体类型的属性。 null如果未找到任何属性,则返回 。

FindProperty(String)

获取具有给定名称的属性。 null如果未定义具有给定名称的属性,则返回 。

FindRuntimeAnnotation(String)

获取具有给定名称的运行时注释,如果不存在,则返回 null

(继承自 IAnnotatable)
FindRuntimeAnnotationValue(String)

获取具有给定名称的运行时注释的值,如果不存在,则返回 null

(继承自 IAnnotatable)
GetAnnotation(String)

获取具有给定名称的批注,如果不存在,则引发该批注。

(继承自 IReadOnlyAnnotatable)
GetAnnotations()

获取当前 对象上的所有注释。

(继承自 IReadOnlyAnnotatable)
GetChangeTrackingStrategy()

获取用于此类型的更改跟踪策略。 此策略指示上下文如何检测类型实例的属性更改。

(继承自 IReadOnlyTypeBase)
GetChangeTrackingStrategyConfigurationSource()

返回 的配置 GetChangeTrackingStrategy()源。

GetComplexProperties()

获取在此类型上定义的复杂属性。

GetDeclaredComplexProperties()

获取在此类型上声明的复杂属性。

GetDeclaredMembers()

获取在此类型上声明的成员。

GetDeclaredProperties()

获取在此类型上声明的所有标量属性。

GetDerivedComplexProperties()

获取从此类型派生的类型上声明的复杂属性。

GetDerivedProperties()

获取从此类型派生的类型上声明的所有标量属性。

GetFlattenedComplexProperties()

返回实现 IComplexProperty的所有属性,包括复杂类型上的属性。

(继承自 ITypeBase)
GetFlattenedDeclaredProperties()

返回实现 IProperty的所有声明属性,包括复杂类型上的属性。

(继承自 ITypeBase)
GetFlattenedProperties()

返回实现 IProperty的所有属性,包括复杂类型上的属性。

(继承自 ITypeBase)
GetIgnoredMembers()

获取所有被忽略的成员。

GetMembers()

获取在此类型和基类型上定义的成员。

GetNavigationAccessMode()

获取 PropertyAccessMode 用于此类型的导航的 。

(继承自 IReadOnlyTypeBase)
GetNavigationAccessModeConfigurationSource()

返回 的配置 GetNavigationAccessMode()源。

GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

获取具有给定名称的运行时注释的值,如果不存在,则添加该值。

(继承自 IAnnotatable)
GetProperties()

获取在此类型上定义的所有标量属性。

GetProperty(String)

获取具有给定名称的属性。

GetPropertyAccessMode()

获取 PropertyAccessMode 用于此类型的属性和导航的 。

(继承自 IReadOnlyTypeBase)
GetPropertyAccessModeConfigurationSource()

返回 的配置 GetPropertyAccessMode()源。

GetRuntimeAnnotations()

获取当前 对象上的所有运行时注释。

(继承自 IAnnotatable)
GetSnapshottableMembers()

返回更改跟踪时可能需要快照值的所有成员。

(继承自 ITypeBase)
IsAbstract()

获取一个值,该值指示此结构类型是否表示抽象类型。

(继承自 IReadOnlyTypeBase)
IsAssignableFrom(IReadOnlyTypeBase)

确定此类型是派生自 (还是与给定类型) 相同。

(继承自 IReadOnlyTypeBase)
IsIgnored(String)

指示是否忽略给定的成员名称。

IsStrictlyDerivedFrom(IReadOnlyTypeBase)

确定此类型是否派生自 (但与给定类型) 不同。

(继承自 IReadOnlyTypeBase)
RemoveAnnotation(String)

从此 对象中删除具有给定名称的批注。

(继承自 IConventionAnnotatable)
RemoveComplexProperty(IConventionComplexProperty)

从此类型中删除属性。

RemoveComplexProperty(String)

从此类型中删除属性。

RemoveIgnored(String)

删除忽略的成员名称。

RemoveProperty(IReadOnlyProperty)

从此类型中删除属性。

RemoveProperty(String)

从此类型中删除属性。

RemoveRuntimeAnnotation(String)

从此 对象中删除给定的运行时批注。

(继承自 IAnnotatable)
SetAnnotation(String, Object, Boolean)

设置存储在给定名称下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 IConventionAnnotatable)
SetChangeTrackingStrategy(Nullable<ChangeTrackingStrategy>, Boolean)

设置要用于此类型的更改跟踪策略。 此策略指示上下文如何检测类型实例的属性更改。

SetNavigationAccessMode(Nullable<PropertyAccessMode>, Boolean)

PropertyAccessMode设置要用于此实体类型的导航的 。

SetOrRemoveAnnotation(String, Object, Boolean)

设置存储在给定名称下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。 如果 null 提供了 ,则删除现有批注。

(继承自 IConventionAnnotatable)
SetPropertyAccessMode(Nullable<PropertyAccessMode>, Boolean)

PropertyAccessMode设置要用于此类型的属性的 。

SetRuntimeAnnotation(String, Object)

设置存储在给定键下的运行时注释。 如果具有指定名称的批注已存在,则覆盖现有批注。

(继承自 IAnnotatable)
ShortName()

获取给定 的 IReadOnlyTypeBase 短名称,该名称可在其他标识符中使用。

(继承自 IReadOnlyTypeBase)

扩展方法

AddAnnotations(IConventionAnnotatable, IEnumerable<IConventionAnnotation>, Boolean)

向 对象添加批注。

GetAnnotation(IConventionAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean)

设置存储在给定名称下的批注。 如果具有指定名称的批注已存在,则覆盖现有批注。 如果 null 提供了 ,则删除现有批注。

GetNavigationAccessModeConfigurationSource(IConventionTypeBase)

返回 的配置 GetNavigationAccessMode(ITypeBase)源。

GetPropertyAccessModeConfigurationSource(IConventionTypeBase)

返回 的配置 GetPropertyAccessMode(ITypeBase)源。

IsIgnored(IConventionTypeBase, String)

指示是否忽略给定的成员名称。

SetNavigationAccessMode(IConventionTypeBase, Nullable<PropertyAccessMode>, Boolean)

PropertyAccessMode设置要用于此实体类型的导航的 。

请注意,单个导航可以替代此访问模式。 此处设置的值将用于未指定替代的任何导航。

SetPropertyAccessMode(IConventionTypeBase, Nullable<PropertyAccessMode>, Boolean)

PropertyAccessMode设置要用于此类型的属性的 。

请注意,各个属性和导航可以替代此访问模式。 此处设置的值将用于未指定替代的任何属性或导航。

DisplayName(ITypeBase)

获取给定 ITypeBase的友好显示名称。

FullName(ITypeBase)
已过时。.

获取给定 IReadOnlyTypeBase的唯一名称。

IsAbstract(ITypeBase)

检查此实体类型是否表示抽象类型。

ShortName(ITypeBase)

获取给定 的 ITypeBase 短名称,该名称可在其他标识符中使用。

AnnotationsToDebugString(IAnnotatable, Int32)

获取对象上声明的所有注释的调试字符串。

GetAnnotation(IAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

FindMappingFragment(IReadOnlyTypeBase, StoreObjectIdentifier)

返回特定类似表的存储对象的类型映射。

此方法通常由数据库提供程序 (和其他扩展) 使用。 它通常不在应用程序代码中使用。

GetContainerColumnName(IReadOnlyTypeBase)

获取类型映射到的容器列名。

GetDeleteStoredProcedure(IReadOnlyTypeBase)

返回类型为删除映射到的存储过程, null 如果未映射到存储过程,则返回该存储过程。

GetFunctionName(IReadOnlyTypeBase)

返回类型映射到 null 的函数的名称,如果未映射到函数,则返回 。

GetInsertStoredProcedure(IReadOnlyTypeBase)

返回类型为插入而映射到的存储过程, null 如果未映射到存储过程,则返回该存储过程。

GetJsonPropertyName(IReadOnlyTypeBase)

获取映射到 JSON 列的给定实体使用的 JSON 属性值。

GetMappingFragments(IReadOnlyTypeBase)

返回所有配置的类型映射片段。

此方法通常由数据库提供程序 (和其他扩展) 使用。 它通常不在应用程序代码中使用。

GetMappingFragments(IReadOnlyTypeBase, StoreObjectType)

返回给定类型的所有已配置类型映射片段。

此方法通常由数据库提供程序 (和其他扩展) 使用。 它通常不在应用程序代码中使用。

GetMappingStrategy(IReadOnlyTypeBase)

获取派生类型的映射策略。

GetSchema(IReadOnlyTypeBase)

返回包含映射表的数据库架构。

GetSqlQuery(IReadOnlyTypeBase)

返回用于为类型提供数据的 SQL 字符串, null 如果未映射到 SQL 字符串,则返回 。

GetTableName(IReadOnlyTypeBase)

返回类型映射到 null 的表的名称,如果未映射到表,则返回 。

GetUpdateStoredProcedure(IReadOnlyTypeBase)

返回类型为更新映射到的存储过程,如果未 null 映射到存储过程,则返回该存储过程。

GetViewName(IReadOnlyTypeBase)

返回类型映射到的视图的名称, null 如果未映射到视图,则返回该名称。

GetViewSchema(IReadOnlyTypeBase)

返回包含映射视图的数据库架构。

IsMappedToJson(IReadOnlyTypeBase)

获取一个值,该值指示指定的实体是否映射到 JSON 列。

GetNavigationAccessMode(ITypeBase)

获取 PropertyAccessMode 用于此类型的导航的 。

请注意,单个导航可以替代此访问模式。 此处返回的值将用于未指定替代的任何导航。

GetPropertyAccessMode(ITypeBase)

获取 PropertyAccessMode 用于此类型的属性和导航的 。

请注意,各个属性和导航可以替代此访问模式。 此处返回的值将用于未指定替代的任何属性或导航。

适用于