I am developing a site with MVC 3 and Entity Framework 4.1. I am new to MVC 3 Development with Entity Framework so was hoping for some help with some design decisions. My site only has approx 15 pages that a user can go to. Rather than have controllers for each page - I was going to just have one controller class - (but have models for each page). And in the controller class I will keep my methods for each page in regions so they are easy to expand up. So for example I was going to have a LogOn Method in my SiteController that has RedirectToAction Homepage - and the Hompage() Method will live in my SiteController in the HomePage region.
I already have a Database Designed from a colleague (there are approx 12 or so Tables in the DB) - I have been looking at how Entity Framework will create code from that - however would it be advised to keep this code in a DAL folder and still have my own models for each page? So for example - I have a FileName that will be saved in the Database. On my homepage I want to show that FileName - so is it good practice to have a string FileName on my Homepage Model and then in the HomePage() view method the model.FileName is set from db.context(get filename from db).
Would it be best then to instansiate all the db context at the instanstiation point of my SiteController or just instansiate them in the methods that require them? i.e - if Homepage View needs table 1 and table 2 then new them in the Hompage() method and if another view method needs data from or has to save data to table 3/4 then new them at start of that method?