protected void DBAccess(Action <TALContext> action, bool saveChanges = false) { if (m_context.Database.CurrentTransaction != null) { action(m_context); if (saveChanges) { m_context.SaveChanges(); } } else { using (var transaction = m_context.Database.BeginTransaction(System.Data.IsolationLevel.ReadUncommitted)) { action(m_context); if (saveChanges) { m_context.SaveChanges(); } transaction.Commit(); } } }