public void UpdateSetting(StoreSettingNames settingName, string value) { StoreSetting setting = new StoreSetting(); if (setting.LoadByPrimaryKey(this.Id.Value, settingName.ToString())) { setting.Value = value; } else { setting.StoreId = this.Id.Value; setting.Name = settingName.ToString(); setting.Value = value; } setting.Save(); }
public string GetSetting(StoreSettingNames settingName) { if (this.settings == null) { LoadSettings(); } return(settings.TryGetValueOrEmpty(settingName.ToString())); }