public void Save(SettingsViewModel settingsViewModel)
 {
     AppSettings setting = new AppSettings(settingsViewModel.Id)
                            {
                                Key = (SettingsKeys)settingsViewModel.SettingKey,
                                Value = settingsViewModel.Value
                            };
     _settingsRepository.Save(setting);
 }
        public SettingsViewModel Map(AppSettings s)
        {
            var Keys = from Enum e in Enum.GetValues(typeof(SettingsKeys))
                       select new { Key = e, Value = e.ToString() };
                           
            var settingViewModel=  new SettingsViewModel
            {

                SettingKey = (int) s.Key,
                Value = s.Value,
                Id = s.Id,
                IsActive = s._Status == EntityStatus.Active ? true : false,
            };
            //settingViewModel.KeyList = new SelectList(Keys, "key", "Value");
            return settingViewModel;
        }