Photochemical cycloaddition of the enaminecarbaldehydes 1a-d and the alkenes 2a-f leads to the 2-hydroxytetrahydropyridines 4, which give directly or by treatment with trifluoroacetic acid the 1,4-dihydropyridines 5aa-5df in nearly quantitative yields.