示例#1
0
        protected override bool SetTransaction(ITransactionObject transaction)
        {
            if (transaction.TransactionInstance is int)
            {
                TransactionObject = transaction;
                DbOjectInstance.SetTransaction(transaction.TransactionInstance);
                return(true);
            }

            return(false);
        }
示例#2
0
        protected override Task <bool> SetTransactionAsync(ITransactionObject transaction, CancellationToken cancellationToken)
        {
            var result = false;

            if (transaction.TransactionInstance is int)
            {
                TransactionObject = transaction;
                DbOjectInstance.SetTransaction(transaction.TransactionInstance);
                result = true;
            }

            return(Task.FromResult(result));
        }
示例#3
0
 protected override Task <bool> SetTransactionAsync(ITransactionObject transaction, CancellationToken cancellationToken)
 {
     TransactionObject = transaction;
     DbOjectInstance.SetTransaction(transaction.TransactionInstance);
     return(Task.FromResult(true));
 }