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 261 forks source link

Adding support for read replicas with EF Core store #677

Open acasciani opened 1 year ago

acasciani commented 1 year ago

We currently have two connection strings with RDS Aurora for where our tenant data is stored. Connection string one is for our read/write database node and connection string two is for our read only database node. We plan to customize the EFCoreStore to take a second DB Context which is intended to be used only for read operations and update the methods that perform SELECTs to use this second context. Ideally, this would be contained within the Finbuckle EF Core code.

Would you consider adding support for a read replica DB Context within the EFCoreStore that ships with Finbuckle? We'd be happy to assist with this if it helps expedite this feature.

AndrewTriesToCode commented 11 months ago

Hi, sorry for the slow reply. I do not plan on adding this feature simply because I want to keep EFCoreStore as simple as possible to serve as an example. I do highly encourage you to customize as you see for your needs and if you get a good solution to update this issue with your approach to help others in the future.

Thanks!