I am doing my first project in ASP.NET MVC and using the NerdDinner sample project in ScottGu's book as a guide. In his project, all his strongly typed views neatly correspond to the objects he defined (e.g. Dinner). That is not really reality of a business application.
For instance, in my app, a page (e.g. View) gets most of its information from the primary object that the strongly typed View was created from. But it also has to display information from a dozen other objects.
So, what is the preferred pattern of passing all this information into the View?
- Do I pass the primary object via the Model and the rest of the info via ViewData?
- Do I create a master object for each View that encompasses all the data I might need for that page?
- Is there a better approach?