service lifetime
How long the container keeps reusing one object: never, per request, or forever.
A service lifetime is transient (new instance per resolution), scoped (one per scope, such as a web request) or singleton (one for the container's lifetime).
Loading interactive…
Examples
AddTransient,AddScopedandAddSingleton: a new object every time, one per request, or one for the whole app.
See also