Is it possible to implement MediatR in the Aggregates (Domain Layer) without dependency injection (DDD)?
问题 To prevent reinventing the wheel, I'd like to use MediatR in the Aggregates to publish domain events. (Un)Fortunately(?) MediatR works as a dependency that is injected into the classes, and not something that I can call statically. Therefore I'd end up creating a direct dependency on the library via the constructor. I don't remember where I read it (and if I read it right), that I should avoid non-business dependencies in the constructors of the Aggregates. Therefore, I shouldn't do something