BOTH.
In an isochoric process, the gas does not do any work - since $W=P\Delta V$ and the volume, being constant renders the work done zero.
So,the first law of thermodynamics becomes,
$$Q=\Delta U+W$$
Since $W=0$,
$$Q=\Delta U$$
So, both the formulae are correct.
EDIT
The relation $Cv=\frac{\Delta U}{n\Delta T}$ is always applicable. The relation between internal energy and temperature, as you have read from the answer, can be derived from kinetic theory (using the equipartition theorem).
$$U=\frac f2 nrt$$
Differentiating this, you will get the expression you seek. So, the term $C_v$ is in the equation only because it fits the necessary condition (it is a lot more easier to measure than the degrees of freedom).
So, in short, the $C_v$ has to be measured under constant volume, because, under constant volume, $C_v=\frac f2 R$$. But, once you have found that out, you can expect it to valid everywhere.
For an even more intuitive example, I'll give you an example.
Consider, a a system (gas) at a temperature $T_1$. Now, you give it some energy (say, under constant volume)and take its temperature to $T_2$. Let the change in internal energy be $\Delta U$. Let this be case one.
In the next case, you supply more energy, but still, bring the temperature down by the same amount (i.e. to $T_2$). Now, since the internal energy must depict the temperature (to some extent) of the gas, the change in internal energy must remain the same. So, the $\Delta U$ you defined in the first case should be valid here too, hence generalising the expression