Open Closed

Share entity implementation between modules #743


User avatar
0
Denis created

What is the best way to share entity implementation between multiple modules. Eg I have Attribute entity (holds name and value) with some logic implemented inside I need to use the same implementation in several modules to DRY.

I just look at source code of ABP and found that something similar is done in Framework folder.

Thanks

  • ABP Framework version: latest
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes

2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Entities between modules should be independent, In domain-driven design, the module is also a context boundary. However, you can share entities by reference to the domain project of the module.

  • User Avatar
    0
    Denis created

    @liangshiwei Thanks

    I agree with you and I would not want to reference domain of another module. I just looking for best way and figure out that my design of modules is just wrong

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19