Configure services with dependency injection in ASP.NET Core
Understand and implement dependency injection in an ASP.NET Core app. Use ASP.NET Core's built-in service container to manage dependencies. Register services with the service container.
Learning objectives
By the end of this module, you'll be able to:
- Describe the role of the service container in an ASP.NET Core app.
- Register services with the service container.
- Retrieve services from the service container in C# code.
Prerequisites
- Ability to write C# code at a beginner level.
- Ability to use the .NET CLI at a beginner level.
- Latest .NET SDK installed.
- Visual Studio Code with C# Dev Kit extension installed.