EFCore.GenericRepository icon indicating copy to clipboard operation
EFCore.GenericRepository copied to clipboard

Support Dynamic Connection String

Open castell0riz0n opened this issue 2 years ago • 1 comments

Hi. thanks for this great library I have a multi-tenant application and each tenant has its own connection string how can I handle this? if currently, the library supports dynamic connection strings, please tell me how

castell0riz0n avatar Jul 16 '22 06:07 castell0riz0n

@castell0riz0n Hi, For multi-tenant purpose we can approach this way.

  1. Make a directory name it as config
  2. Create a separate local.settings file for each tenant in the config.
  3. Once we have this folder ready Bases on the deployment environment we swap the existing local.setting.json file with the one from config directory using pipeline line scripts usually yaml.

Thereby, settings can be configured based on pipeline we run. Hope this helps.

allamkuladeep avatar Sep 15 '22 15:09 allamkuladeep