Nice ! it is always good practice to use Service Discovery either as “address” discovery, or as a proxy.
but , the idea behind DI relies further that just a Service Discovery mechanism. this concept is the “D” part in the S-O-L-I-D practice which states “Dependency Inversion” (not Injection as many think).
it is an OOP practice that helps to decouple application in a clean manner.
Yes , the event bus does that exactly ,but sometimes you do want to follow the DI pattern in order to inject different behaviours to classes, allow you code to be testable, and using some mocking framework to assist you with those IRepository objects (instead of building a pipeline for “test” purposes), assist you in replacing behaviours in runtime and many more goodies.
Good article !