Like a staffing agency register — you list the roles and which person fills each role.
Services are registered in Program.cs. The DI container knows which concrete class to create when an interface is requested.
> ICacheService → RedisCacheService (Singleton) > IOrderRepository → SqlOrderRepository (Scoped) > IEmailBuilder → HtmlEmailBuilder (Transient)
Like a staffing agency register — you list the roles and which person fills each role.
Services are registered in Program.cs. The DI container knows which concrete class to create when an interface is requested.
> ICacheService → RedisCacheService (Singleton) > IOrderRepository → SqlOrderRepository (Scoped) > IEmailBuilder → HtmlEmailBuilder (Transient)
Sign in to cast your vote
Sign in to share your feedback and join the discussion.