Physical experiments can characterize the elastic response of granular materials in terms of macroscopic state variables, namely volume (packing) fraction and stress, while the microstructure is not accessible and thus neglected. Here, by means of numerical simulations, we analyze dense, frictionless granular assemblies with the final goal to relate the elastic moduli to the fabric state, i.e., to microstructural averaged contact network features as contact number density and anisotropy. The particle samples are first isotropically compressed and then quasi-statically sheared under constant volume (undrained conditions). From various static, relaxed configurations at different shear strains, infinitesimal strain steps are applied to “measure” the effective elastic response; we quantify the strain needed so that no contact and structure rearrangements, i.e. plasticity, happen. Because of the anisotropy induced by shear, volumetric and deviatoric stresses and strains are cross-coupled via a single anisotropy modulus, which is proportional to the product of deviatoric fabric and bulk modulus (i.e., the isotropic fabric). Interestingly, the shear modulus of the material depends also on the actual deviatoric stress state, along with the contact configuration anisotropy. Finally, a constitutive model based on incremental evolution equations for stress and fabric is introduced. By using the previously measured dependence of the stiffness tensor (elastic moduli) on the microstructure, the theory is able to predict with good agreement the evolution of pressure, shear stress and deviatoric fabric (anisotropy) for an independent undrained cyclic shear test, including the response to reversal of strain.