We've developed a solution using the microservices template.
We have 2 services with their own database. We need to create a query using the Abp libraries that joins results from queries from each of the databases.
Use case:
The client microservices manages clients. The programs service manages programs that are assigned to clients.
We want to have one query that gets all of the programs of a given type. We want to have a second query that returns all of the clients associated with those programs.
How do we do that using the microservices template? Has anyone done this before and if so is there a sample we can follow?
1 Answer(s)
-
0
Hi,
Please check interservice communication https://docs.abp.io/en/commercial/latest/startup-templates/microservice/interservice-communication
Also you can synchronize entity across service to do the query. you can see the cmskit module have synchronized identity users using event bus https://docs.abp.io/en/abp/latest/Distributed-Event-Bus
https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Users/CmsUser.cs https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Users/CmsUserSynchronizer.cs