You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question regarding the usage of DbContext in both the host and modular applications within ABP.
In ABP modular applications, entities defined within a module are referenced in the module’s DbContext. However, it appears that the same entities also need to be referenced in the main application’s DbContext.
This approach seems to introduce tight coupling between the module and the main application. Ideally, a module should remain self-contained without requiring its entities to be referenced in the main application's DbContext.
Could you clarify why this is necessary? If this approach is intentional, are there best practices to mitigate the coupling while maintaining modularity?
Hi,
I have a question regarding the usage of DbContext in both the host and modular applications within ABP.
In ABP modular applications, entities defined within a module are referenced in the module’s DbContext. However, it appears that the same entities also need to be referenced in the main application’s DbContext.
This approach seems to introduce tight coupling between the module and the main application. Ideally, a module should remain self-contained without requiring its entities to be referenced in the main application's DbContext.
Could you clarify why this is necessary? If this approach is intentional, are there best practices to mitigate the coupling while maintaining modularity?
this is the link to the article : https://abp.io/docs/latest/tutorials/modular-crm/part-03
Additionally, here are the respective DbContext implementations:
Module's DbContext:

Main Application's DbContext:

The text was updated successfully, but these errors were encountered: