RCommon-Team / RCommon

A cohesive set of .NET 6, 7, 8+ infrastructure libraries that utilizes abstractions for persistence, unit of work/transactions, distributed event handling, CQRS, and more.
https://rcommon.com
Apache License 2.0
11 stars 3 forks source link

Multitenancy Support #16

Open JasonMWebb opened 2 years ago

JasonMWebb commented 2 years ago

Add multitenancy support for entities, and persistence operations. Needs to include tenant resolver for the following scenarios:

Tenancy Models to support:

Will also need to create connection string factory to support dynamically changing connection strings based on tenancy model.

jasonmwebb-lv commented 2 years ago

There is nothing that currently prevents a multi-tenant strategy from being implemented though it could almost certainly be made easier. The biggest issue surrounding multitenancy is the management of connection strings which is currently correlated with the DataSourceProvider. As it stands, a developer can inject their own factory into a service and dynamically set the datasource name based on multitenancy requirement so this is not a high priority.

JasonMWebb commented 2 months ago

I recommend that we use this as the initial implementation. It seems to be comprehensive: FinBuckle