Magnesium powder mixed with CuSO4 solution
Your equation is very close, but you it is not $\ce{Mg2SO4}$. $\ce{Mg^{2+}}$ has a charge of $2+$, and $\ce{SO4^{2-}}$ has a charge of $2-$. They combine in a ratio of 1:1, so the result is 

$$\ce{Mg + CuSO4 -&gt; MgSO4 + Cu} ~ .$$

The ionic equation does not include the $\ce{SO4^{2-}}$, and in the case of this equation the net ionic equation is the same as the ionic equation. Ionic equations look at what happens to electrons.
In this case, electrons are being transferred from the magnesium to the copper (since the copper is bonded to $\ce{SO4^{2-}}$ it is in the form $\ce{Cu^2+}$).

$$\ce{Mg + Cu^{2+} -&gt; Mg^{2+} + Cu} ~ .$$

Since the charge on the $\ce{SO4^{2-}}$ doesn't change, it's just a spectator ion.