Inject multiple implementations of the same interface
what's the proper way to inject multiple implementations of the same interface?
is a setup like this possible? Which one is being injected? How to have different classes use different impelmentations without them using concrete dependencies of Implementation1 and Implementation2?
3 Replies
I see thank you
"and adds to the previous one when multiple services are resolved via IEnumerable<IMyDependency>"
Does that mean when my ctor takes a List<IInterface> then [implementation1, implementation2] is being injected or how does that work?
got it thx
/close
$close
If you have no further questions, please use /close to mark the forum thread as answered
can't mark the thread as answered somehow