Getting Started with Dependency Injection in .NET 2
Dependency injection helps us write better code. But when you don't understand the why and how, it can be baffling. This course gives you a good foundation of the concepts and patterns so you can start writing code that is easy to change and test.
What you'll learn
Tight coupling makes our code hard to change and test. In this course, "Getting Started with Dependency Injection in .NET", you will learn the foundational knowledge to break tight coupling with Dependency Injection. First, you will learn how to use constructor injection to create loosely-coupled code. Next, you will see how to snap those loosely-coupled pieces together in different ways to easily change functionality. Then, you will discover how easy it is to unit test code that uses dependency injection. Finally, you will explore some of the magic of dependency injection containers. When you are finished with this course, you will have the skills and knowledge of dependency injection needed to break tight coupling and write more maintainable code.
Table of contents
- Overview 2m
- Dependency Injection Container Features 1m
- Demo: Using Ninject 7m
- Demo: Using a Decorator with Ninject 2m
- Demo: Using Autofac 5m
- Demo: Manual Registration with Autofac 2m
- Demo: Using a Decorator with Autofac 2m
- Demo: Late Binding with Autofac 6m
- Demo: ASP.NET Core MVC Dependency Injection 3m
- Dependency Injection Container Summary 2m
- Course Summary 6m