Chapter 3: Dependency Injection
This chapter talks about Dependency Injection (DI) in the context of ASP.NET Core. Moreover, this chapter will get you up to speed with the concept of DI, its capabilities, and how it is used in ASP.NET Core applications. We will review the different types of DI by following code examples so that you will be able to understand how and when to apply them in situations where they may be required. We will also be looking at DI containers, service lifetimes, and how to handle complex scenarios as you progress throughout the chapter. By the end of this chapter, you'll be able to understand how DI works by following some practical examples. You should then be able to apply the knowledge and skills that you have learned ...
Get ASP.NET Core 5 for Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.