Substituted dihydropyrans can be efficiently synthesized in good yields with excellent diastereoselectivity from the reaction of aldehydes or epoxides and ethyl 3-alkyl-3-hydroxy-5-methylhex-5-enoate via an oxonium-ene cyclization reaction catalyzed by trimethylsilyl trifluoromethanesulfonate (TMSOTf) under mild conditions.