Open GrantErickson opened 7 years ago
This is now totally doable with the new data sources and behaviors infrastructure. However, it may be practical to write up a page in the docs that explains this scenario in specific detail - leaving this issue open for now to track work on such a page.
Adding multi-tenancy (single database) to an application is a complex process that requires changes at nearly every level of the application. By baking this into Coalesce we could have the framework handle this for us.
Potential solution: Add a Tenant class and a TenantId to classes that need to be segmented by tenant. Create an interface and base class for multi-tenant classes in an application. Bake this into a provider model that would allow switching from tenant to tenant. (in a sample project) Create a Super Admin role for managing tenancy?
There is a great use case for multi-tenancy even when it isn't technically needed in that it gives a great way of testing in production (feature flags per tenant) without jeopardizing production.