public void AddDbContext(DapperDbContext dbContext) { if (ActiveDbContexts.ContainsKey(dbContext.GetKey())) { return; } ActiveDbContexts.Add(dbContext.GetKey(), dbContext); if (_dbContextAddedEvent != null) { _dbContextAddedEvent(dbContext); } }