Lifetime
Add this feature using AddLifetimes() extension;
app.Features.AddLifetimes([...]);
Singleton
Adds services with SingletonAttribute metadata to IServiceCollection as
singleton.
c => c.Singleton()
Scoped
Adds services with ScopedAttribute metadata to IServiceCollection as scoped.
c => c.Scoped()
Transient
Adds services with TransientAttribute metadata to IServiceCollection as
transient.
c => c.Transient()