12 DI Container introduction

In this chapter

  • Using configuration files to enable late binding
  • Explicitly registering components in a DI Container with Configuration as Code
  • Applying Convention over Configuration in a DI Container with Auto-Registration
  • Choosing between applying Pure DI or using a DI Container

When I (Mark) was a kid, my mother and I would occasionally make ice cream. This didn’t happen too often because it required work, and it was hard to get right. Real ice cream is based on a crème anglaise which is a light custard made from sugar, egg yolks, and milk or cream. If heated too much, this mixture curdles. Even if you manage to avoid this, the next phase presents more problems. Left alone in the freezer, the cream mixture crystallizes, ...

Get Dependency Injection Principles, Practices, and Patterns 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.