语言

IConventionTrigger 接口

定义

表示存储触发器。

public interface IConventionTrigger : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyTrigger
type IConventionTrigger = interface
    interface IReadOnlyTrigger
    interface IReadOnlyAnnotatable
    interface IConventionAnnotatable
Public Interface IConventionTrigger
Implements IConventionAnnotatable, IReadOnlyTrigger
实现

注解

有关详细信息和示例,请参阅 数据库触发器 。

属性

名称 说明
Builder

获取可用于配置此触发器的生成器。

EntityType

IConventionEntityType获取定义此触发器的依据。

IsInModel

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

(继承自 IConventionAnnotatable)
Item[String]

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

(继承自 IReadOnlyAnnotatable)
ModelName

获取模型中触发器的名称。

(继承自 IReadOnlyTrigger)

方法

名称 说明
AddAnnotation(String, Object, Boolean)

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

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

向对象添加批注。

(继承自 IConventionAnnotatable)
AnnotationsToDebugString(Int32)

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

(继承自 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(继承自 IConventionAnnotatable)
GetAnnotation(String)

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

(继承自 IConventionAnnotatable)
GetAnnotations()

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

(继承自 IConventionAnnotatable)
GetConfigurationSource()

获取此触发器的配置源。

RemoveAnnotation(String)

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

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

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

(继承自 IConventionAnnotatable)
SetOrRemoveAnnotation(String, Object, Boolean)

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

(继承自 IConventionAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

创建给定元数据的可读表示形式。

警告:不要依赖于返回的字符串的格式。 它仅用于调试,可以在版本之间任意更改。

(继承自 IReadOnlyTrigger)

扩展方法

名称 说明
GetDatabaseName(IReadOnlyTrigger, StoreObjectIdentifier)

获取触发器的数据库名称。

GetDatabaseName(IReadOnlyTrigger)

获取数据库中触发器的名称。

GetDatabaseNameConfigurationSource(IConventionTrigger)

获取数据库名称的配置源。

GetDefaultDatabaseName(IReadOnlyTrigger, StoreObjectIdentifier)

返回将用于此触发器的默认数据库名称。

GetDefaultDatabaseName(IReadOnlyTrigger)

返回将用于数据库中此触发器的默认名称。

GetTableName(IReadOnlyTrigger)

获取定义此触发器的表的名称。

GetTableNameConfigurationSource(IConventionTrigger)

获取表名称的配置源。

GetTableSchema(IReadOnlyTrigger)

获取定义此触发器的表的架构。

GetTableSchemaConfigurationSource(IConventionTrigger)

获取表架构的配置源。

GetTriggerOperation(IReadOnlyTrigger)

获取此触发器的 Cosmos DB 触发器操作。

GetTriggerOperationConfigurationSource(IConventionTrigger)

获取 ConfigurationSource Cosmos DB 触发器操作。

GetTriggerType(IReadOnlyTrigger)

获取此触发器的 Cosmos DB 触发器类型。

GetTriggerTypeConfigurationSource(IConventionTrigger)

获取 Cosmos DB 触发器类型的值 ConfigurationSource 。

SetDatabaseName(IConventionTrigger, String, Boolean)

设置数据库中触发器的名称。

SetTableName(IConventionTrigger, String, Boolean)

设置定义此触发器的表的名称。

SetTableSchema(IConventionTrigger, String, Boolean)

设置定义此触发器的表的架构。

SetTriggerOperation(IConventionTrigger, Nullable<TriggerOperation>, Boolean)

设置此触发器的 Cosmos DB 触发器操作。

SetTriggerType(IConventionTrigger, Nullable<TriggerType>, Boolean)

设置此触发器的 Cosmos DB 触发器类型。

适用于