public void Dispose() { UnitOfWorkManager.Instance.RemoveUnitOfWorkScope(_transactionId); _repository.Transaction.Dispose(); if (_scopeType == UnitOfWorkScopeType.New) { _repository.Dispose(); } }