Rectangle 27 0

asp.net mvc MVC Dependency Injection Autofac, where to specify dependencies?


You will have to compose your container on the application level, e.g. using an OwinStartup class or similar. That said, I usually separate out the dependency setup for each assembly/project into their own Autofac module. This way, the assemblies become more self-contained. The application level setup also becomes much cleaner, its only responsibility is pulling in the various modules and building the container.

Note
Rectangle 27 0

asp.net mvc MVC Dependency Injection Autofac, where to specify dependencies?


You will have to compose your container on the application level, e.g. using an OwinStartup class or similar. That said, I usually separate out the dependency setup for each assembly/project into their own Autofac module. This way, the assemblies become more self-contained. The application level setup also becomes much cleaner, its only responsibility is pulling in the various modules and building the container.

Note
Rectangle 27 0

asp.net mvc MVC Dependency Injection Autofac, where to specify dependencies?


You will have to compose your container on the application level, e.g. using an OwinStartup class or similar. That said, I usually separate out the dependency setup for each assembly/project into their own Autofac module. This way, the assemblies become more self-contained. The application level setup also becomes much cleaner, its only responsibility is pulling in the various modules and building the container.

Note