public void Disposing(DbConnection connection, DbConnectionInterceptionContext interceptionContext) { var context = EFProfilerContextProvider.GetLoggedDbConnection(connection, interceptionContext); _profiler.ConnectionDisposing(connection, context); }
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); }