Open Closed

Retrieve list of all tenants from microservice #4777


User avatar
0
Mohammed.sheik created
  • ABP Framework version: v5.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi There,

We are using the microservices template and would like your advice on what is the best way to retrieve a list of all tenants from a microservice Application layer.

your assistance is greatly appreciated.


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can take a look at this document.

    https://docs.abp.io/en/commercial/latest/startup-templates/microservice/interservice-communication

  • User Avatar
    0
    Mohammed.sheik created

    Hi There,

    Thank you for taking the time to respond. I have reviewed the documentation and made the following changes:

    1. Included the Saas.Application.Contracts.csproj and Saas.HttpApi.Client.csproj project references in my microservice project.
    2. Added the SaasApplicationContractsModule as a dependency in my ApplicationContractsModule.
    3. Added the SaasHttpApiClientModule as a dependency in my ApplicationModule.
    4. Configured the RemoteServices in my microservices appsettings.json.

    However, I am facing an issue with the absence of SaasAppService or repositories that can be injected into my microservices application layer to obtain a list of all tenants.

    Although this might be a simple task, I am new to ABP, so please bare with me.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can inject the interface(ITenantAppService) from Application.Contracts .

  • User Avatar
    0
    Mohammed.sheik created

    Hi,

    After injecting ITeantAppService into my AppService and calling 'await _tenantAppService.GetListAsync' I get the following error: Not Found.

    In my appsettings.json I have RemoteService config: "RemoteServices": { "Default": { "BaseUrl": "https://localhost:44388/", "UseCurrentAccessToken": "false" } },

    Please advise what could be the issue.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you share a simple project? liming.ma@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09