The ASP.NET Core dependency injection model works well when mapping one interface to one implementation of the interface, but doesn't have a framework to map an interface to multiple interface implementations. This article, along with code samples, shows how to handle this with a delegate and a facade pattern.
source https://www.c-sharpcorner.com/article/dependency-injection-with-multiple-implementations-of-the-same-interface/
No comments:
Post a Comment