Chapter 13. Autofac

Menu

  • Introducing Autofac
  • Managing lifetime
  • Working with multiple components
  • Configuring difficult APIs

In the previous chapters, you saw how to map the principles and patterns from parts 13 to specific DI Containers. In this chapter, we’ll do the same with the Autofac DI Container.

Autofac is an example of what we could call second-generation DI Containers.

Note Examples of other second-generation DI Containers are Ninject1 and Unity.2

The second-generation DI Containers are based directly on .NET 3.5, so their architectures are often directly based on the language and platform features that became available at that time. Not only do they have an intimate understanding of generics, but many also employ lambda expressions ...

Get Dependency Injection in .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.