public void Run() { var currentState = _metadataProvider.GetCurrentState(); _transactionProvider.Start(); try { foreach (var script in _scriptProvider.GetAllScripts()) { if (ScriptShouldBeRun(script, currentState)) { if (_scriptApplicator.ApplyScript(script)) { WriteUpdateEntry(script, currentState); } } } _transactionProvider.Commit(); } catch (Exception e) { _transactionProvider.Rollback(); Console.WriteLine(e); throw; } }