Singleton vs Scoped vs Transient Service Scope in C#

Followings are the specific use-case for different services.


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


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


  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