Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Support for tenant store #104

Open
etiennecl opened this issue Jan 20, 2020 · 1 comment
Open

Support for tenant store #104

etiennecl opened this issue Jan 20, 2020 · 1 comment
Assignees

Comments

@etiennecl
Copy link

I know the purpose of this library is to support DDD, CQRS and event sourcing. I was wondering where it would make more sense to extend this library in order to add Tenant Support has the StoreProvider is already inside the Base project and the EF projects already implement the StoreProvider interface.

My first guess would be to add a TenantId to my Aggregates, entities, commands, and events, but I don't see how I could enforce this when creating a new AggregateRoot or applying a global filter in the StoreProvider in order to scope the data of the current tenant?

@lucabriguglia
Copy link
Owner

Interesting concept, there is the Source property that can be set in the Command but it is saved in the store only for commands and events. Yhe tenant could be set in the aggregate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants