Shaolinq.Persistence.SqlDatabaseContext.CreateSqlTransactionalCommandsContext C# (CSharp) Method

CreateSqlTransactionalCommandsContext() protected method

protected CreateSqlTransactionalCommandsContext ( IDbConnection connection, System.Data.TransactionContext transactionContext ) : SqlTransactionalCommandsContext
connection IDbConnection
transactionContext System.Data.TransactionContext
return SqlTransactionalCommandsContext
		protected virtual SqlTransactionalCommandsContext CreateSqlTransactionalCommandsContext(IDbConnection connection, TransactionContext transactionContext)
		{
			return new DefaultSqlTransactionalCommandsContext(this, connection, transactionContext);
		}

Same methods

SqlDatabaseContext::CreateSqlTransactionalCommandsContext ( System.Data.TransactionContext transactionContext ) : SqlTransactionalCommandsContext

Usage Example

Esempio n. 1
0
        public virtual DatabaseTransactionContextAcquisition AcquirePersistenceTransactionContext(SqlDatabaseContext sqlDatabaseContext)
        {
            SqlTransactionalCommandsContext retval;

            if (this.Transaction == null)
            {
                retval = sqlDatabaseContext.CreateSqlTransactionalCommandsContext(null);

                return new DatabaseTransactionContextAcquisition(this, sqlDatabaseContext, retval);
            }
            else
            {
                TransactionEntry outValue;

                if (this.persistenceTransactionContextsBySqlDatabaseContexts.TryGetValue(sqlDatabaseContext, out outValue))
                {
                    retval = outValue.sqlDatabaseCommandsContext;
                }
                else
                {
                    retval = sqlDatabaseContext.CreateSqlTransactionalCommandsContext(this.Transaction);

                    this.persistenceTransactionContextsBySqlDatabaseContexts[sqlDatabaseContext] = new TransactionEntry(retval);
                }

                return new DatabaseTransactionContextAcquisition(this, sqlDatabaseContext, retval);
            }
        }
All Usage Examples Of Shaolinq.Persistence.SqlDatabaseContext::CreateSqlTransactionalCommandsContext