# Inversion of Control Container

A framework tool that creates objects and supplies their dependencies automatically.

## What is **Inversion of Control Container**?

An **inversion of control container** (DI container) is a framework tool that creates objects and hands them their dependencies automatically. You register "for `IEmailSender`, use `SmtpEmailSender`" once, and it wires everything up.

```csharp
builder.Services.AddScoped<IEmailSender, SmtpEmailSender>();
builder.Services.AddScoped<OrderService>(); // gets an IEmailSender automatically
```

Level: Master · [More OOP terms at this level](https://www.ask-codey.com/glossary/subjects/oop/master)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/inversion-of-control-container
