Is there a possibility to create a table overlapping database context to avoid putting the database context in a library or creating different table prefixes/different databases for the same things?
To elaborate, this is an example of a CRM system.
- Pages
- Categories
- BlogEntries
- Comments
- Products
- Profiles
- Licenses
- Activations
- Invoices
- Customers
Activation Server Context uses
- Products
- Licenses
- Activations
- Customers
Customer Relationship Context uses
- Products
- Customers
- Invoices
Frontend Website Context uses
- Products
- Customers
- Invoices
- Profiles
- Pages
- Categories
- BlogEntries
- Comments
The only ways I could think of doing this...
This is the primary reason I've avoided Domain Driven Design is because of questions like this.
I'd just have one big context... it's a repository wrapper and your repository is what it is. If you store everything in one big DB, then your context/repository should be one big repository, IMO.
It's not a separation of concern issue, in my opinion. in the sense that the context wraps repository concerns only, not business logic around those entities... it does one thing: Serialize and Deserialize data/entities from permanent storage.
We experimented about 4 years ago with domain driven design and we found that we were repeatedly having these fairly meaningless debates about 'does product belong in Domain 1 or Domain 2'. This is a real drag on productivity and it's really because DDD doesn't really fit most real world scenarios because overlap is the norm not the exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With