Aug 5, 2011 at 1:30 PM
Edited Aug 5, 2011 at 1:38 PM
Hey I had the idea of an Settingsmanager module.
therefor I created a module with Setting(String)/Value(String) as Table.
E.g we could have gridpagesize/10 as Setting/value pair.
now i want to be able in other modules to get these settings via Service of that module. that works so far.
public SettingsRecord GetSetting(string settingName)
return _SettingsRepository.Get(x => x.SettingName == settingName);
my question is now: If I create the empty module, nothing is in. how would you handle it, that it automatically created default entries for all required settings.
i thought about something like @T(string) so that i could even use settings that arent defined as of yet.
will this be easily realizable? what do you think
and how can i achieve that all elements will be written into the database on initialization ;))