Skip to content

Latest commit

History

History
13 lines (8 loc) 路 908 Bytes

File metadata and controls

13 lines (8 loc) 路 908 Bytes

Dependency Injection in .NET

Welcome to the Dependency Injection in .NET project! 馃帀 This repository is a hands-on demonstration of how to use AddScoped, AddSingleton, and AddTransient in ASP.NET Core applications. It aims to provide a clear understanding of these lifetimes and how they can be applied effectively in real-world scenarios.

Project Overview Dependency Injection (DI) is a cornerstone of modern .NET development. It promotes loosely coupled and testable code by managing object lifetimes and dependencies automatically.

In this project, you'll find:

Scoped Services: Scoped services are created once per request and shared throughout the request's lifetime. Singleton Services: Singleton services are created once and shared across the entire application lifecycle. Transient Services: Transient services are created every time they are requested, ensuring a new instance for each use.