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}$$

Recall the definition of such an integral:
$$ \int_{C} \pmb{F} \cdot d \pmb{r}  := \int_{a}^{b}  \pmb{F}(\pmb{r}(t)) \cdot \pmb{r} '(t) \, dt     $$
where $\pmb{r}:[a,b] \rightarrow C$ is a parametrisation of $C$.
