public static DbConnectionContext GetLoggedDbConnection(ProfiledDbTransaction interceptionContext, int connectionId)
 {
     var context = new DbConnectionContext
     {
         IsAsync = false,
         IsCanceled = false,
         Exception = null,
         ConnectionString = interceptionContext.Connection.ConnectionString,
         TransactionId =
             interceptionContext.InnerTransaction == null
                 ? (int?)null
                 : UniqueIdExtensions<DbTransaction>.GetUniqueId(interceptionContext.InnerTransaction).ToInt(),
         IsolationLevel = interceptionContext.IsolationLevel,
         ObjectContextId = SessionIdLoggingContext.SessionId.GetUniqueId(),
         ObjectContextName = SessionId,
         ConnectionId = connectionId
     };
     return context;
 }
        public static DbConnectionContext GetLoggedDbConnection(ProfiledDbTransaction interceptionContext, int connectionId)
        {
            var context = new DbConnectionContext
            {
                IsAsync          = false,
                IsCanceled       = false,
                Exception        = null,
                ConnectionString = interceptionContext.Connection.ConnectionString,
                TransactionId    =
                    interceptionContext.InnerTransaction == null
                        ? (int?)null
                        : UniqueIdExtensions <DbTransaction> .GetUniqueId(interceptionContext.InnerTransaction).ToInt(),
                IsolationLevel    = interceptionContext.IsolationLevel,
                ObjectContextId   = SessionIdLoggingContext.SessionId.GetUniqueId(),
                ObjectContextName = SessionId,
                ConnectionId      = connectionId
            };

            return(context);
        }