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

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13