Step 1: Split the integrand.
$(x+1)e^x = xe^x+e^x$, so the integral splits into two simple parts.
Step 2: Use a known standard form.
We know $\int e^x(f(x)+f'(x))\,dx=e^xf(x)+C$. Take $f(x)=x$. Then $f'(x)=1$, and $e^x(x+1)$ is exactly $e^x(f+f')$.
Step 3: Write the answer.
\[ \int e^x(x+1)\,dx = x e^x + C \]
Step 4: Check by differentiation.
$\frac{d}{dx}(xe^x)=e^x+xe^x=(x+1)e^x$. This gives back the integrand, so the answer is right.
Final Answer:
So the result is $xe^x+C$.
\[ \boxed{xe^x+C} \]