Пример #1
0
        private void DisposeAllSqlDatabaseContexts()
        {
            DataAccessModelTransactionManager.GetAmbientTransactionManager(this).FlushConnections();

            foreach (var context in this.sqlDatabaseContextsByCategory
                     .SelectMany(c => this.sqlDatabaseContextsByCategory.Values)
                     .SelectMany(c => c.DatabaseContexts))
            {
                context.Dispose();
            }
        }
Пример #2
0
 public SqlTransactionalCommandsContext GetCurrentSqlDatabaseTransactionContext()
 {
     return(DataAccessModelTransactionManager.GetAmbientTransactionManager(this).GetCurrentContext(true).GetCurrentDatabaseTransactionContext(this.GetCurrentSqlDatabaseContext()));
 }
Пример #3
0
 public DataAccessObjectDataContext GetCurrentDataContext(bool forWrite)
 {
     return(DataAccessModelTransactionManager.GetAmbientTransactionManager(this).GetCurrentContext(forWrite).CurrentDataContext);
 }