Skip to content

Glossary: ASP.NET Core

Lifetime

Also written: Singleton, Scoped, Transient, AddSingleton, AddScoped, AddTransient

How long the container keeps one service object: singleton for the whole app, scoped per request, transient every time it's asked for. A singleton must not depend on a scoped service.

Where the book teaches it

Related terms

Dependency injectionService