GetCurrent() public static method

public static GetCurrent ( DataAccessModel dataAccessModel, bool forWrite ) : TransactionContext
dataAccessModel DataAccessModel
forWrite bool
return TransactionContext
Esempio n. 1
0
        public SqlTransactionalCommandsContext GetCurrentCommandsContext()
        {
            var transactionContext = TransactionContext.GetCurrent(this, true);

            if (transactionContext == null)
            {
                throw new InvalidOperationException("No Current DataAccessScope");
            }

            return(transactionContext.GetSqlTransactionalCommandsContext());
        }
Esempio n. 2
0
 internal DataAccessObjectDataContext GetCurrentDataContext(bool forWrite)
 {
     return(TransactionContext.GetCurrent(this, forWrite)?.GetCurrentDataContext());
 }
Esempio n. 3
0
 private TransactionContext GetCurrentContext(bool forWrite)
 {
     return(TransactionContext.GetCurrent(this, forWrite));
 }