  Recently, the importance of the electronic many-body effect in the dark
matter (DM) detection has been recognized and a coherent formulation of the
DM-electron scattering in terms of the dielectric response of the target
material has been well established in literatures. In this paper, we put
relevant formulas into practical density functional theory (DFT) estimation of
the excitation event rates for the diamond and silicon semiconductor targets.
Moreover, we compare the event rates calculated from the energy loss functions
with and without the local field effects. For a consistency check of this
numerical method, we also compare the differential spectrum and detection reach
of the silicon with those computed with the $\mathtt{GPAW}$ code. It turns out
that this DFT approach is quite consistent and robust. As an interesting
extension, we also investigate the in-medium effect on the detection of the
solar-reflected DM flux in silicon-based detectors, where the screening effect
is found to be also remarkable in the optically thick regime, and to turn
insignificant in the optically thin regime, depending on the energies of the
reflected DM particles.
