Dependency injection container
A dependency injection container is software that constructs or resolves objects and supplies their dependencies according to configured relationships.
ASP.NET Core in Action, 3e
The built-in dependency injection container is the default service container provided by ASP.NET Core for registering and resolving application services.
- How it is used
- Provides framework and application services to ASP.NET Core components and minimal API handlers.
- How deep it goes
- Explains registration, dependency graphs, multiple implementations and service lifetimes, then demonstrates replacing the built-in container.
- Examples
- Uses an email sender dependency graph, a LinkGenerator endpoint and multiple message sender implementations.
- What you can do after
- Operate and configure the container by registering services, choosing lifetimes and resolving dependencies.
Read how ASP.NET Core in Action, 3e explains dependency injection container →
Spring Start Here, Second Edition
An IoC container creates and connects object instances according to configuration.
- How it is used
- Manages Spring objects used by dependency injection, transactions, security, and testing.
- How deep it goes
- Defines beans and compares three registration methods, but does not detail container internals.
- Examples
- Names @Bean, stereotype annotations such as @Component, and registerBean() as registration options.
- What you can do after
- Understand how Spring manages beans and the main ways to register them.
Read how Spring Start Here, Second Edition explains dependency injection container →
Also covered in
What to know first
- dependency injectionDependency injection is a software design technique in which a component receives its dependencies from outside rather than creating or locating them internally.
Related concepts
- dependency injectionused by · Dependency injection is a software design technique in which a component receives its dependencies from outside rather than creating or locating them internally.
- AddControllersWithViewsconfigured by · AddControllersWithViews is an ASP.NET Core service-registration method that adds the services required for MVC controllers and views.
- dbcontextconfigures · DbContext is the Entity Framework Core class that coordinates database access, entity querying and change tracking, and persistence for an application’s data model.
- dependency graphproduces · A dependency graph is a graph whose nodes represent entities and whose edges represent dependency relationships among them.
- hosting modelpart of · A hosting model is the architecture and configuration that determines how an application is started, managed, and exposed by its host environment.
Questions about dependency injection container
What is dependency injection container?
A dependency injection container is software that constructs or resolves objects and supplies their dependencies according to configured relationships.
Which Manning books explain dependency injection container?
ASP.NET Core in Action, 3e and Spring Start Here, Second Edition.
What should I know before learning dependency injection container?
Manning books that teach dependency injection container usually introduce dependency injection first.
What is dependency injection container part of?
Dependency injection container is part of hosting model. A hosting model is the architecture and configuration that determines how an application is started, managed, and exposed by its host environment.
What is dependency injection container also called?
Dependency injection container is also called inversion of control container, ioc container or DI container.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

