Home  /  Questions  /  Question

88   96.5
Mar 07, 2013

Resolve Class in Different Layers Using UnityContainer


   I am using dependecy injection in Asp.Net MVC 3 with unity container. I register classes in web config and i resolve them in controller initialize method or constructor.  So can i resolve a class in Business Layer, or Service Layer or DataAccess Layer.

 ForExample i register  CustomerDto DataTransferObject    in  Global.asax and  I want to Resolve it in ServiceLayer.  I know that static variables Application Wide so I can access this from EveryWhere in the Application. Am I correct ?