Exemplo n.º 1
0
        public void Disposing(DbConnection connection,
                              DbConnectionInterceptionContext interceptionContext)
        {
            var context = EFProfilerContextProvider.GetLoggedDbConnection(connection, interceptionContext);

            _profiler.ConnectionDisposing(connection, context);
        }
Exemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     _profiler.ConnectionDisposing(InnerConnection, NHProfilerContextProvider.GetLoggedDbConnection(InnerConnection));
     if (disposing && InnerConnection != null)
     {
         InnerConnection.StateChange -= StateChangeHandler;
         InnerConnection.Dispose();
     }
     InnerConnection = null;
     base.Dispose(disposing);
 }