Dependency Injection in ASP.NET Core 2
This course will teach you everything you need to know about using dependency injection in ASP.NET Core. The skills you will learn will help you to build complex ASP.NET Core applications that make full use of dependency injection.
What you'll learn
A foundation of ASP.NET Core development is a thorough knowledge of using dependency injection. In this course, Dependency Injection in ASP.NET Core, you will learn how to use the Microsoft dependency injection container in your applications. First, you will learn about registering services into the dependency injection container. Next, you will explore how to resolve those services wherever they are needed in your application. Finally, you will discover how to extend or replace the built-in container for more complex scenarios. When you are finished with this course, you will have complete knowledge of the Microsoft dependency injection container that will help you as you build well-structured ASP.NET Core applications.
Software required: .NET Core 2.1 SDK or greater. An editor or IDE of your choice, such as Visual Studio 2017 or VS Code.
Table of contents
- Introduction and Overview 1m
- Introducing the Tennis Booking Application 1m
- Service Descriptors 3m
- Add vs. TryAdd 3m
- Registering an Interface Multiple Times 2m
- Replacing and Removing Registrations 3m
- Registering Multiple Implementations of an Interface 5m
- Improving Multiple Implementations with TryAddEnumerable 3m
- Implementation Factories 7m
- Registering an Implementation against Multiple Service Types 6m
- Registering Open Generics 3m
- Clean Code Using Extension Methods 4m
- Review 1m