public virtual async Task <IDbContextTransaction> BeginTransactionAsync(
            IsolationLevel isolationLevel, CancellationToken cancellationToken = new CancellationToken())
        {
            await OpenAsync(cancellationToken);

            CurrentTransaction = new TestRelationalTransaction(this, await _realConnection.BeginTransactionAsync(isolationLevel, cancellationToken));
            return(CurrentTransaction);
        }
        public IDbContextTransaction UseTransaction(DbTransaction transaction)
        {
            var realTransaction = _realConnection.UseTransaction(transaction);

            if (realTransaction == null)
            {
                CurrentTransaction = null;
                return(null);
            }

            Open();
            CurrentTransaction = new TestRelationalTransaction(this, realTransaction);
            return(CurrentTransaction);
        }
 public virtual IDbContextTransaction BeginTransaction(IsolationLevel isolationLevel)
 {
     Open();
     CurrentTransaction = new TestRelationalTransaction(this, _realConnection.BeginTransaction(isolationLevel));
     return(CurrentTransaction);
 }