What is the best aproach in BoilerPlate for deal with config values? Store it in web.config (web app) an app.config and pass through modules?
Regards
1 Answer(s)
-
0
Hi,
If these configurations are used on startup of the application, like connection strings, it's good to store them in the web.config (or app.config).
For rest of settings, ABP defines ISettingManager that is used to get and change values. If you are using module-zero, then use ISettingManager. But before you should define your settings. It's not documented yet, but you can see a running example: <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/tree/master/sample">https://github.com/aspnetboilerplate/mo ... ter/sample</a> See MySettingProvider for definitions and <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/master/sample/ModuleZeroSampleProject.Application/Questions/QuestionAppService.cs#L40">https://github.com/aspnetboilerplate/mo ... ice.cs#L40</a> for usage.
If you are not using module-zero, you should implement setting store. Then you can inject and use ISettingManager.