csharp Microsoft.SqlServer.Server.SqlTriggerAttribute类(方法)实例源码

下面列出了csharp Microsoft.SqlServer.Server.SqlTriggerAttribute 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:Microsoft.SqlServer.Serve   
[SqlTrigger(Name = @"SalesAudit", Target = "[dbo].[SalesInfo]", Event = "FOR INSERT")]
public static void SalesAudit()
{
   // Get the trigger context.
   SqlTriggerContext triggContext = SqlContext.TriggerContext;
   
   switch (triggContext.TriggerAction)
   {
      case TriggerAction.Insert:

      // Do something in response to the INSERT.
         
      break;
   }
}


问题


面经


文章

微信
公众号

扫码关注公众号