# Dependency Injection

*noun*

say it: **“dih-PEN-den-see in-JEK-shun”** **/dɪˈpɛndənsi ɪnˈdʒɛkʃən/**

ASP.NET Core's built-in system that creates the services a class needs and hands them to it.

## What is **Dependency Injection**?

ASP.NET Core has **dependency injection** built in: register services in `builder.Services`, and the framework hands them to constructors and handlers that ask for them.

```csharp
builder.Services.AddScoped<IRecipeRepository, SqlRecipeRepository>();

app.MapGet("/recipes", (IRecipeRepository recipes) => recipes.ListAsync());
```

## In a sentence

- “Through **dependency injection**, the controller's constructor receives IProductRepository.”

Level: Apprentice · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=2)

Updated: November 9, 2026

## In other subjects

- [Dependency Injection in Angular](https://www.ask-codey.com/glossary/dependency-injection-angular)
- [Dependency Injection in OOP](https://www.ask-codey.com/glossary/dependency-injection)

Source: https://www.ask-codey.com/glossary/dependency-injection-aspnet-core
