3. Let the sets be
$$
M=\{-2,0,1\}, N=\{1,2,3,4,5\},
$$

The mapping $f: M \rightarrow N$ ensures that for any $x \in M$, $x + f(x) + x f(x)$ is an odd number. The number of such mappings $f$ is ( ).
(A) 45
(B) 27
(C) 15
(D) 11
3. A.

When $x=-2$, $x+f(x)+x f(x)=-2-f(-2)$ is odd, then $f(-2)$ can take $1, 3, 5$, which gives three possibilities; when $x=0$, $x+f(x)+x f(x)=f(0)$ is odd, then $f(0)$ can take $1, 3, 5$, which gives three possibilities; when $x=1$, $x+f(x)+x f(x)=1+2 f(1)$ is odd, then $f(1)$ can take $1, 2, 3, 4, 5$, which gives five possibilities. By the multiplication principle, there are $3 \times 3 \times 5=45$ mappings.