public void Dispose()
{
if (this.disposed)
{
throw new ObjectDisposedException(nameof(DataAccessScope));
}
this.disposed = true;
if (!this.complete)
{
this.transaction?.Rollback();
}
if (this.isRoot)
{
this.transaction?.Dispose();
}
DataAccessTransaction.Current = this.outerTransaction;
this.nativeScope?.Dispose();
}
}