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.26k stars 256 forks source link

Supporting Database Type Conversion for Tenants in EF Core #843

Closed wibu009 closed 6 days ago

wibu009 commented 1 week ago

Is it possible to enable database type conversion for different tenants in EF Core? Ideally, tenants could select their preferred database type. With EF Core, creating separate migration sets for each type seems achievable. I attempted adding a "database provider" field to tenant information and using it, but this conflicts with the CacheStore mechanism. I'm unsure how to resolve this issue. My project is using FullstackHero's Web API template and FullstackHero is using this package for multi tenant configuration

AndrewTriesToCode commented 1 week ago

Hi, there is no built in support for this but it might be possible. What did the code you tried look like in the OnConfiguring method?

edit: on second thought it would be inOnModeling instead of configuring…