private void UpdateConfig(IEnumerable <IConfigurationData> config, string name, string value) { IConfigurationData configFind = config.Where(x => x.Name == name).FirstOrDefault(); if (configFind == null) { configFind = new ConfigurationData(); configFind.Name = name; configFind.Value = value; configFind.UserCanModify = false; DataSourceAdapter.InsertConfiguration(configFind); } else { configFind.Value = value; DataSourceAdapter.UpdateConfiguration(configFind); } }