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>();

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>();

Default image
Sriram Mannava

I'm a full-stack developer and a software enthusiast who likes to play around with cloud and tech stack out of curiosity.

Leave a Reply