Exemplo n.º 1
0
    public void Execute(IBaseDatabaseService db, TriggerParameters e)
    {
        var type = e.Entity.GetType();

        Logger.DebugFormat("Executing {1}: '{0}'", type.Name, e.Action);

        var sw = Stopwatch.StartNew();

        try
        {
            Run(db, e);
        }
        catch (Exception ex)
        {
            Logger.Error(ex);
            throw;
        }
        finally
        {
            Logger.DebugFormat("Executed {1}: '{0}' ({2}ms)", type.Name, e.Action, sw.ElapsedMilliseconds);
        }
    }
Exemplo n.º 2
0
 public abstract void Run(IBaseDatabaseService db, TriggerParameters e);