Im slowly migrating over from web forms and have been doing a lot of tutorials recently with MVC and have been going over the repository pattern quite a bit. Everything has been going smooth, I have created my repository, service layer, tests and all that fun stuff, created a controller called a basic GetAll() method and passed it to the view and am displaying this as a list. This also works great.
What my problem is now is that I have a master page where I want to choose somthing from a dropdownlist, which will then populate my view.
In webforms this is a very simple thing to do, but it seems populating a master page in MVC is somewhat of a tricky thing to do.
Im trying to avoid ViewData at all costs. I know want to use a Master ViewModel and a BaseController, as I started writing my master view model, I had to create an instance of my service layer in my constructor in order to populate my "Master Model".
public MasterViewModel(IProductService service)
this._service = service;
Then I thought to myself, I am probably going to need data from somthing not product related in my master page which means I would need to inject another service into my constructor.
View Complete Post