This simple simulation shows that ideal transformers "pass" DC voltage across. Just run the simulation, close the switch and observe the output voltage. The reason why this wouldnt work infinetley (steady state) is that
1. Saturation current of primary side
2. You have to store infinite energy in the transformer magnetic field (Correlates to 1.)