DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
The function of the above code is to let the Container to manage the Controller instances. When a web request comes to the server, the server will get a Controller instance from the Container to handler the request.
But without Container, the server will automaticlly create a Controller instance.
What is the advantage of the management of Controller in Container? Thank you.