Don't understand how to solve line integral dot product I am trying to solve the integral:
$$\int_{C} \bf F \cdot dr$$

between $x=0,y=0,z=0$ and $x=0,y=1,z=1$ where $\textbf {F} = (0,y,1-y^2-z)$
and $C$ is $z=2y-y^2$

I have the solution however I do not understand why the "$-z$" is replaced by $C$. I know that it is easier to solve this way but wouldn't this change $F$?

I am confused and perhaps what I am saying doesn't even make sense.
Could someone please walk me through how to solve such a question?
Solution:

$$\frac{dr}{dy}=(0,1,2-2y)$$

$$\int_{0}^{1}(0,y,1+y^2-(2y-y^2)) \cdot (0,1,(2-2y))dy$$
$$=\int_{0}^{1}(2-5y+4y^2)dy=\frac{5}{6}$$

When we're solving line integrals, it is often useful to use parametrizations even if the parametrizations are obvious, as it is in your case. Your curve $C$ is given by $z = 2y-y^{2}$, so if $\gamma= \gamma(t)$ denotes your parametrized curve, you should have:
$$\gamma(t) = \begin{cases} \displaystyle x = 0 \\ \displaystyle y = t \\ \displaystyle z = 2t-t^{2} \end{cases}$$
where I simply used the change of variables $y=t$, which is trivial but gives a nicer way to look to the problem. Here $0\le t \le 1$. Now, as you know:
$$\int_{C}\vec{F}\cdot d\vec{r} = \int_{0}^{1}\vec{F}(\gamma(t))\cdot \gamma'(t)dt$$
But now $\gamma'(t) = (0,1,2-2t)$ and $\vec{F}(\gamma(t)) = (0,t, 1-t^{2}-(2t-t^{2}))$. Thus:
$$\int_{C}\vec{F}\cdot d\vec{r} = \int_{0}^{1}(0,t,1-t^{2}-(2t-t^{2}))\cdot (0,1,2-2t)$$ 
which is the integral on your solution. In other words, your solution was simply more brief and skipped the parametrization passages. Because the parametrization was kinda obvious, I mean, it basically changes variables, it could be avoided if you wanted. But this step-by-step solution may turn things more clear. 
