---
title: "What is dependency injection in ASP.NET Core?"  
description: "What is dependency injection in ASP.NET Core?"  
author: "Aashish Khadka"  
published: 2026-10-26  
canonical: https://answers.mindstick.com/qa/118280/what-is-dependency-injection-in-asp-net-core  
category: "ASP.NET Core"  
tags: ["c#", ".NET", "Dependency Injection"]  
reading_time: 1 minute  

---

# What is dependency injection in ASP.NET Core?

I’m trying to understand how dependency injection fits into an ASP.NET Core application. I’ve seen services registered in `Program.cs` and then passed into controllers or other classes through their constructors, but I’m not clear on what the framework is doing behind the scenes.

How does [ASP.NET Core dependency injection](https://answers.mindstick.com/qa/116677/how-can-dependency-injection-help-in-ai-service-architecture-in-aspnet-core) resolve those services, and how should I think about the different [service lifetimes](https://www.mindstick.com/forum/157470/what-are-service-lifetimes-in-net-core)—`Transient`, `Scoped`, and `Singleton`? I’m especially interested in when choosing the wrong lifetime can cause problems.


---

Original Source: https://answers.mindstick.com/qa/118280/what-is-dependency-injection-in-asp-net-core

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
