Can anyone give me an idea how to make the landscape scene to potrait

I have a landscape game and I want to make it portrait orientation only when that scene is loaded.
One scene will be landscape and through that scene this next scene will load and i want to make it portrait dynamically.
Mostly through code. any ideas ?