Hi,
What I thought should be a fairly simple search, turned out to be alot more.
Atm I'm using a baseclass(MasterModel) for all my Models, that then get passed down from the ViewPage< HomeIndexModel > to the ViewMasterPage< MasterModel > and everything works fine. This was done this way after reading a post by "Scott Gu".
Then I thought about inheriting from the ViewPage and extending the Factory or where ever the ViewPage is built from ... but then I got lost.
Who is responsible for instantiating the ViewPage, ViewMasterPage and ViewUserControl.
The problem is more or less that I'm using an instance of the same class on 99% of all pages and always on the MasterPage, so its a pain to keep passing it around in the model all the time.
Is this even the right way to go or do you guys have any other suggestions ?
Update
I need to be able to inject complex types taken from my IOC ( StructureMap ) into the constructor of the ViewPage, so it will be easy to change the implementation. Thats why I'm looking for the place where the ViewPage gets constructed.