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

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

services.AddSingleton<IMyClass, MyClass>();

Ram
Ram

I'm a full-stack developer and a software enthusiast who likes to play around with cloud and tech stack out of curiosity. You can connect with me on Medium, Twitter or LinkedIn.