Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.3k stars 265 forks source link

Multiple DbContexts per tenant #245

Closed tcorvin closed 4 years ago

tcorvin commented 4 years ago

Does Finbuckle.MultiTenant support multiple connection strings per tenant? (i.e. for an infrastructure database, an auth database, and an app database)

If not, any thoughts and how this could be accomplished "manually?"

Thanks, Tyson

AndrewTriesToCode commented 4 years ago

hi @tcorvin The next version releasing soon will support a custom Tenant Info object so you can have any number of connection strings. Then in the configuration for the database context you would have to somehow choose the connection string you wanted to use.

In the current version you could store them in Items collection, but its just a <string, object> dictionary and not strongly typed.

tcorvin commented 4 years ago

Hey @achandlerwhite, perfect ... I'll use the items collection for now as we wait for next release ... thanks!