Reputation: 3212
using asp.net mvc and installing unity bootstraper through nuget.
I was wondering how can I get access to same unity container at "Application_BeginRequest()","Application_Error()","Application_EndRequest()" that is configured in bootstraper ?
and how can I resolve all instances of an interface at Application_BeginRequest?
Upvotes: 1
Views: 3724
Reputation: 34832
In MVC, your dependency container is available as a singleton at System.Web.Mvc.DependencyResolver.Current
Upvotes: 8