Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 7, 2022, 1:43 AM EDT
They are services, which will be used and integrated using depedency injection, There are 3 types of lifetimes supported by ASP.NET Core for the dependency injection,They are,
1)Transient Service
2)Scoped Service
3)Singleton Service
https://www.c-sharpcorner.com/article/service-lifetime-dependency-injection-asp-net-core/
Vishal JoshiRank #377 · 6.7K reputationPosted Aug 7, 2022, 4:11 AM EDT
Service lifetimes available in .NET Core:
We can register these services with the AddTransient(), AddScoped() and AddSingleton() methods respectively.
Vishal YelveRank #178 · 13.6K reputationPosted Aug 7, 2022, 5:24 AM EDT
There are three lifetimes that can be used with Microsoft Dependency Injection Container, they are:
Amit MohantyRank #112 · 20K reputationPosted Aug 8, 2022, 2:04 AM EDT
1 - Transient
2 - Scoped
3 - Singleton
For more details check the below links.
https://www.dotnettricks.com/learn/dependencyinjection/implementation-asp-net-core-mvc
https://code-maze.com/dependency-injection-lifetimes-aspnet-core/