Exemplo n.º 1
0
 public static void Run(this ITransactionContext context, Action action, Action rollback = null, Action cleanup = null)
 {
     if (rollback != null)
     {
         context.AddRollbackAction(rollback);
     }
     if (cleanup != null)
     {
         context.AddCleanupAction(cleanup);
     }
     action();
 }