public override bool Equals(object obj) { if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey)) { return false; } DbConnectionPoolKey key = obj as DbConnectionPoolKey; return (key != null && _connectionString == key._connectionString); }