Session
A new instance of the service is created and cached for the current session; it will be automatically disposed, if it implements an IDisposable, at the end of the session.
Shared
A single static instance of the service is available to all sessions.
Thread
A new instance of the service is created for each new thread; it will be automatically disposed, if it implements an IDisposable, at the end of the request.
Transient
A new instance of the service is created every time it's requested. The consumer is responsible for disposing it.
Registers a scoped service.