public override void Dispose() { if (_disposed) { return; } _disposed = true; if (_transaction != null) { _transaction.Dispose(); _transaction = null; } _activeDbContexts.Values.ForEach(dbContext => { dbContext.Dispose(); IocHelper.Release(dbContext); }); _activeDbContexts.Clear(); }
/// <summary> /// Releases handler object using Ioc container. /// </summary> /// <param name="handler">Handler to be released</param> public void ReleaseHandler(IEventHandler handler) { IocHelper.Release(handler); }