SqlTriggerAttribute 构造函数
定义
程序集中的方法定义的特性,用于将方法标记为 SQL Server 中的触发器。An attribute on a method definition in an assembly, used to mark the method as a trigger in SQL Server.
public:
SqlTriggerAttribute();
public SqlTriggerAttribute ();
Public Sub New ()
示例
public partial class Triggers
{
[SqlTrigger(Target="authors", Event="FOR UPDATE")]
public static void AuthorsUpdateTrigger()
{
//...
}
}
Partial Public Class Triggers
<SqlTrigger(Target:="authors", Event:="FOR UPDATE")>
Public Shared Sub AuthorsUpdateTrigger()
'...
End Sub
End Class
注解
下面的示例指定通过更新表中) (现有数据来激活触发器 UPDATE authors 。The following example specifies that the trigger is activated by updating existing data (UPDATE) in the table authors.