What is a Scoped service?

A scoped service instance is created only once within a request scope and is reused for all calls within that request.

services.AddScoped<IMyClass, MyClass>();

What is a Transient service?

A transient service instance is created each time a calling component method or dependent class requests for an instance from the container.

services.AddTransient<IMyClass, MyClass>();

What is a Singleton service?

A singleton service instance is created only once during entire application lifetime, common across all requests.

services.AddSingleton<IMyClass, MyClass>();