public IInternalTransaction GetCurrentInternalTransaction()
        {
            IInternalTransaction transaction;

            foreach (var context in _sortedPrimaryContexts)
            {
                transaction = TryGetInternalTransaction(context);
                if (transaction != null)
                {
                    if (Log.IsFinestEnabled)
                    {
                        transaction.LogFinest($"Retrieved from {context.ToString()}");
                    }
                    return(transaction);
                }
            }

            transaction = TryGetInternalTransaction(_asyncContext);
            if (transaction != null)
            {
                if (Log.IsFinestEnabled)
                {
                    transaction.LogFinest($"Retrieved from {_asyncContext.ToString()}");
                }
            }
            return(transaction);
        }