From the course: ASP.NET Core in .NET 6: Dependency Injection

Dependency injection overview

- If you're looking for a job as a .NET developer, it is essential that you understand what dependency injection is and how it works. It's a popular feature in software development that allows for having entities that are not dependent on each other. I'm David Grace and I've been a .NET, C# programmer for over 15 years. And I work with dependency injection regularly. We'll have a look at how to set up and configure dependency injection and walk you through the different service lifetimes and how they work. Afterwards, we'll implement dependency injection into a real-life example using an ASP.NET Core MVC application to show you how to inject a service and use the methods within it. Then, you'll have the opportunity to try it out for yourselves. Finally, we'll talk you through some of the common errors that can occur when setting up dependency injection. So come and join me as we talk through dependency injection in ASP.NET Core and explore the benefits that will make a complex system look simple.

Contents