Core: Using dependency injection with multiple implementations of an interface in ASP.NET Core

Опубликовано: 05 Октябрь 2024
на канале: OrBit of the CodinG
649
14

How do we overcome this limitation of the built-in IoC container in ASP.NET Core?
In the solution outlined below.
we will use an IEnumerable collection of services to register the services and a delegate to retrieve a specific service instance.
Using dependency injection with multiple implementations of an interface in ASP.NET Core