I am currently inserting a dependency in my mvc controller as shown below:
public class HomeController : Controller
{
[Dependency]
public IProxyService ProxyService { get; set; }
}
In global.asax, the type is registered using
UnityContainer _container = new UnityContainer();
_container.RegisterType<IProxyService, SystemProxyServiceEx>();
Now, I need to pass a few parameters to the SystemProxyServiceEx constructor. These include some values stored in the session variable(HttpSessionStateBase Session) that are stored during authentication. How do I make this happen?
HomeController? This way you can remove the dependency on the Unity container from within your application.