Question is in the title. Let me elaborate: Suppose $u\in C_c^1(\mathbb R^n)$. Then we have the Sobolev inequality $$ \Vert u\Vert_{L^{2^*}(\mathbb R^n)}\leq C\Vert\nabla u\Vert_{L^2(\mathbb R^n)} $$ where $2^*=\frac{2n}{n-2}$ is the Sobolev conjugate of $2$, and $C$ depends only on $n$ in this formulation. It seems that this result can be used to prove the following: If $u\in W^{1,2}(\mathbb R^n)$, then $$ \Vert u\Vert_{L^{2^*}(\mathbb R^n)}\leq C\Vert\nabla u\Vert_{L^2(\mathbb R^n)}. $$ To see that the above follows from the Sobolev inequality, simply approximate $u$ in the $W^{1,2}-$norm and $L^{2^*}-$norm simultaneously by smooth compactly supported functions $u_m$, and use the Sobolev inequality.
In particular, this proves that if $u\in W_0^{1,2}(\Omega)$ for $\Omega\subset\mathbb R^n$ open, then we can write the same result as above with $\mathbb R^n$ replaced by $\Omega$, with $C$ independent of $\Omega$. This seems to improve, for instance Theorem 3 in section 5.6 in Evans book, for the specific Sobolev exponent $2^*$ (and analogously, $p^*$).
My question basically is a sanity check: is my sketch of the proof correct?