This wiki page about the DTFT says that the DFT can be obtained from the DTFT by sampling the latter in one cycle at $N$ points:
When the DTFT is continuous, a common practice is to compute an arbitrary number of samples (${{N}}$) of one cycle of the periodic function (${X_{1/T}}$):\begin{align} \underbrace{X_{1/T}\left(\frac{k}{NT}\right)}_{X_k} &= \sum_{n=-\infty}^\infty x[n]\cdot e^{-i 2\pi \frac{kn}{N}} \quad \quad k = 0, \dots, N-1 \\ &= \underbrace{\sum_{N} x_{_N}[n]\cdot e^{-i 2\pi \frac{kn}{N}},}_{DFT}\quad \scriptstyle{\text{(sum over any }n\text{-sequence of length }N)} \end{align} where $x_{_N}$ is a periodic summation: $$x_{_N}[n]\ \triangleq\ \sum_{m=-\infty}^{\infty} x[n-mN]$$
So we essentially have the following equality $$\sum_{n=-\infty}^\infty x[n]\cdot e^{-i 2\pi \frac{kn}{N}}= \sum_{n=0}^{N-1} \sum_{m=-\infty}^{\infty} x[n-mN] e^{-i 2\pi \frac{kn}{N}}. $$
I didn't manage to prove it, is this a known identity?