Open Closed

Problems encountered in abp multi-module development #6505


User avatar
0
327992883@qq.com created
  • ABP Framework version: v7.2.3
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server) /
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Currently, I have two modules (Product Module and Order Module) developed in a modular fashion using NuGet dependencies. The Contracts in the Order Module depend on the Contracts in the Product Module. Now, I need to implement a feature in the Product Module to query the quantity of products in transit in the product inventory table. This requires calculating the quantity of products in ongoing orders in the Order Module. I'm considering using local events to achieve this, where changes in products in orders trigger updates in the quantity of products in transit in the Product Module. However, it's not advisable for the domain of the Order Module to depend on the domain of the Product Module, is it? Can you provide some advice or suggest a better approach? Thank you.

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

    hi

    You can consider the ETO, which is defined on the Domain.Shared module.

    https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#event-transfer-object

    Or the Integration Services.

    https://docs.abp.io/en/abp/latest/Integration-Services

  • User Avatar
    0
    327992883@qq.com created

    hi

    You can consider the ETO, which is defined on the Domain.Shared module.

    https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#event-transfer-object

    Or the Integration Services.

    https://docs.abp.io/en/abp/latest/Integration-Services

    Can I query the quantity of goods in an order in the order module directly from the product module? This eliminates the need for redundant fields

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Yes.

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

  • User Avatar
    0
    327992883@qq.com created

    hi

    Yes.

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

    But I am not using microservice template,I use the multi-module nuget management mode

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Does that solve your problem?

    https://support.abp.io/QA/Questions/6505/Problems-encountered-in-abp-multi-module-development#answer-3a10223f-af27-d950-55bd-7235ba2e9c49

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11