.NET has a built-in dependency injection (DI) container (Microsoft.Extensions.DependencyInjection), used by ASP.NET Core, worker services and console apps. Lifetimes Lifetime One instance per… Typical services AddSingleton application configuration, caches, HttpClient handlers AddScoped request (scope) DbContext, unit of work, per-request state AddTransient every resolution lightweight stateless helpers Captive dependency: never inject a scoped service into a singleton — it would live forever. ASP.NET Core validates this in Development. Patterns Depend on interfaces in constructors; register implementations once in Program.cs. Use the Options pattern (IOptions<T>) for typed configuration. Use IHttpClientFactory / typed clients instead of new HttpClient(). Keyed services (.NET 8)…