AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Mediator 9 tutorial1/2/2023 A request could be a new object which should be saved in the database or an id of on object which should be retrieved. The request is sent to the handler which processes this request. Using the Mediator patternĮvery call consists of a request and a handler. Now, I can use the IMediator object with dependency injection in my controllers. In the OrderApi, I am also using the ICustomerNameUpdateService interface as mediator. I can do this because the controllers are in the same project. In the Startup class, I registered my mediators using: I am installing the MediatR and the in my Api project. Additionally, I am using the MediatR NuGet package, which helps to call the services. In my microservices, the controllers call all needed services and therefore work as the mediator. You can find the code of the finished demo on GitHub.
0 Comments
Read More
Leave a Reply. |