I am trying out Enterprise Library 5.0. My plan is to use it for coming project with ASP.Net MVC. I saw a few examples and was trying out the logging. In of the example, I see the developer get an instance of logger through:
LogWriter logWriter = EnterpriseLibraryContainer.Current.GetInstance<LogWriter>();
The above code works well in my application. In this code, basically we are getting an instance from existing container, right? My questions are:
- How and when is this instance of container created?
- Can I use the same container in my MVC?
- What was the idea of using this method to create container and why not use the EnterpriseLibraryContainer instance in MVC?
Thanks in advance for you comments,ideas & solution.