Exemple #1
0
 public override void ScalarExecuted(DbCommand command
                                     , DbCommandInterceptionContext <object> interceptionContext)
 {
     _stopwatch.Stop();
     if (interceptionContext.Exception != null)
     {
         _logger.Fatal(interceptionContext.Exception
                       , "Db Intercept Error executing command: {0}", command.CommandText);
     }
     else
     {
         _logger.TraceApi("SQL Database", "Interceptor.ScalarExecuted"
                          , _stopwatch.Elapsed, "Command: {0}: ", command.CommandText);
     }
     base.ScalarExecuted(command, interceptionContext);
 }