143
CHAPTER 5 | Designing and Developing Multi-Container and Microservice-Based .NET Applications
// (RabbitMQ or a service bus underneath)
_eventBus.
Publish
(@event);
// ...
}
// ...
}
In
this case, since the origin microservice is
a simple CRUD microservice, that code is placed right into
a Web API controller.
In
more advanced microservices, like when using CQRS approaches, it can
be implemented in the
CommandHandler
class, within the
Handle()
method.
Dostları ilə paylaş: