Singleton vs Scoped vs Transient Service Scope in C#

Followings are the specific use-case for different services.

Singleton

  1. Caching Services
  2. Global Configuration
  3. Business Rules
  4. HttpClients
  5. Persisting state that's useful for the runtime of an application

Scoped

  1. Persisting state throughout application per request - New Instance is created for every request.

Transient

  1. Database Access
  2. File Access
  3. Services that should dispose of their state
  4. When you need a fresh instance of an object every single time