We describe a microscopic theory of the electrons in the microscopic layer between the solvent and the metal-ion cores at an electrode-electrolyte interface in which no specific adsorption of ions takes place at the electrode surface. Unlike some earlier models, our calculations allow for the possibility that the width of this layer can change when the potential on the electrode is changed. In the work described here we report detailed self-consistent calculations of the electronic structure at the surface which confirm the assumptions of our earlier phenomenological formulation incorporating this idea. The results which we find for the compact part of the double-layer capacitance are in qualitative agreement with the observed dependence of this quantity on potential and on crystal face in the case of experiments on single faces. The results permit some conclusions to be drawn about the nature of the forces between the solvent and the metal.