Open hbermani opened 3 years ago
Hi @hbermani Sorry for the late reply -- I think what you described is a good approach. Nothing in the library specifically addresses this type of need. I think it also depends on what the tenant specific requirements are -- separate users? data? authentication? etc. And for the "sibling" tenants what information would they be sharing as common between them?
If you treat the "supertenant" as the Finbuckle tenant then you effectively treat all the subtenants the same and would haev to do your own separation within -- kinda defeats teh point of Finbuckle.MultiTenant but at least it helps at the super level.
Hi @AndrewTriesToCode , Thank you for your input, honestly no need to apologise, it must be challenging keeping this ticking.
So here is my current thinking.
The simplified version:
The over engineered version:
Get Scenario:
Post Scenario (Gets a bit complicated, E.g. a shared form with tasks users across multiple tenants in the same Db):
How easy would it be to enable a 'Contains'/'Like' tenant-id comparator to be triggered after a MultitenantDbContext has been instantiated / when it's created as a shared context in the simplified version, as that seems to be the key to enable this functionality?
Thank you
I keep coming across more and more use cases where a "tenant group" or similar would be useful to have. Did you make any progress on this in your use case?
Hi Andrew,
Unfortunately, I haven't, the project priorities changed and I haven't had a chance to progress this yet.
So here is an interesting scenario.
You have 6 tenants, each with their own tenant-id. Three tenants decide they want to collaborate and want their data connected whilst still respecting data sovereignty. My immediate thinking is that the three tenants will need to share the same tenant-id and then segregation would be done through business logic so EF just talks to one tenant instance. But what would be really nice is the ability to maintain each tenant's tenant-id, perhaps keep them in the same Db, and get EF Core to query across the whole Db (Perhaps get the library to recognise multi-level tenant identifier (e.g. projectAlpha-tenant1 , projectAlpha-tenant2... and have the option to selectively query filter by projectAlpha)
Would welcome your thoughts as to how best to achieve such scenario with this amazing library.