public void BeganTransaction(DbConnection connection,
                                     BeginTransactionInterceptionContext interceptionContext)
        {
            var context = EFProfilerContextProvider.GetLoggedDbConnection(connection, interceptionContext);

            _profiler.TransactionBegan(connection, context);
        }
 public ProfiledDbTransaction(DbTransaction transaction, ProfiledDbConnection connection, IDbProfiler profiler)
 {
     if (transaction == null) throw new ArgumentNullException("transaction");
     if (connection == null) throw new ArgumentNullException("connection");
     InnerTransaction = transaction;
     _connection = connection;
     _profiler = profiler;
     _connectionId = UniqueIdExtensions<DbConnection>.GetUniqueId(connection.InnerConnection).ToInt();
     _profiler.TransactionBegan(connection.InnerConnection, NHProfilerContextProvider.GetLoggedDbConnection(this, _connectionId));
 }
Exemple #3
0
        public ProfiledDbTransaction(DbTransaction transaction, ProfiledDbConnection connection, IDbProfiler profiler)
        {
            if (transaction == null)
            {
                throw new ArgumentNullException("transaction");
            }
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }
            InnerTransaction = transaction;
            _connection      = connection;
            _profiler        = profiler;
            _connectionId    = UniqueIdExtensions <DbConnection> .GetUniqueId(connection.InnerConnection).ToInt();

            _profiler.TransactionBegan(connection.InnerConnection, NHProfilerContextProvider.GetLoggedDbConnection(this, _connectionId));
        }