GetCurrent() public static method

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

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

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