Microscopic calculations of the enhancement factor in the electric dipole sum rule