public virtual void Commit() { if (!_done) { _done = true; _commitAction.Invoke(); _connection.Close(); } }