开发者

Configuration Settings From database for multi-tenancy. Using Castle Windsor + S#arp

开发者 https://www.devze.com 2023-02-03 16:44 出处:网络
I am converting my application to a multi-tenancy application, one of my obstacles is that now I have to store settings for each tenant in the database.

I am converting my application to a multi-tenancy application, one of my obstacles is that now I have to store settings for each tenant in the database.

I am currently using the DictionaryAdapter to read the settings from my app config file into a IConfigurationSettings interface.

Because I can have many tenants, I think my configuration settings need to be registered to castle with different keys, ideally the host name as the key.

However, during the time of castle registration I don't have access 开发者_运维百科to the Request object to get my hostname, also my NHibernate initialisation hasn't taken place.

Anyone got any suggustions?

Paul


If you need to get the settings for each tenant, then can you not do this after the initialisation of NHibernate for the master database and iterate through the tenants?

Also, do the settings actually need to be loaded at startup? Can they be read when required, which will probably be in response to a request.

0

精彩评论

暂无评论...
验证码 换一张
取 消