Open Closed

Is there any chance to use navigation properties in cross-service (eg.identityuser ) in microservice #2569


User avatar
0
mc86 created
  • ABP Framework version: v5.1.3
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:" Hi In microservice-template can't use navigation properties cross services that are very inconvenient。 So any solutions?

2 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Data duplication is one of the solutions.

    Let's say your BusinessMicroserviceService uses userId, user name, user last name and user email. Add these properties to your related entity. To keep them updated, add auto event handler to check if the property you use is changed and update it.

    Or use userId only and make request to userLookUp service (cached users) whenever you need to get the details.

    This is also not related with ABP and you can find very good books and articles about the subject on internet.

  • User Avatar
    0
    mc86 created

    thanks gterdem .

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