288
CHAPTER 6 | Tackle Business Complexity in a Microservice with DDD and CQRS Patterns
// Other types registration
//...
}
}
This is where “the magic happens” with MediatR.
As each command handler implements
the generic
IRequestHandler
interface, when you register
the assemblies using
RegisteredAssemblyTypes
method all the types marked as
IRequestHandler
also gets registered with their
Commands
. For example:
Dostları ilə paylaş: