Bootstrapper Unity in ASP.Net MVC: Where to set DependencyResolver

Oct 17, 2012 at 7:38 PM

I am new to Bootstrapper and am trying to get it to work with ASP.Net MVC.  I have a populated Unity container, but the extension does not appear to set the DependencyResolver. 

Aug 29, 2014 at 1:40 PM
Hi,
You still need to set the dependency resolver in the onstartup for example by casting the Bootstrapper.Container to IUnityContainer and dispose the container at the Shutdown.
Jan 13, 2015 at 1:57 AM
Hi @omaralani If I am using the Bootstrapper in an ASP.NET mvc project, still the startup code for this has to be run from PreApplication method in MVC project right?

So that means, I need to have a reference to this bootstrapper in my MVC project?

Or I am missing an important concept here.. Can you point me to an appropriate implementation of some sort?

Thanks