public void Update(SettingsEntity model)
        {
            var entity = _settingsRepository.FindAsNoTracking(model.Id);

            entity.Value       = model.Value;
            entity.Description = model.Description;
            _settingsRepository.Update(entity);
        }
 public void Create(SettingsEntity settings)
 {
     if (_settingsRepository.Query(v => v.Key == settings.Key).Any())
     {
         throw new ArgumentException("key already exists!");
     }
     _settingsRepository.Create(settings);
 }
        public void Create(string key, string value)
        {
            SettingsEntity model = new SettingsEntity()
            {
                Key   = key,
                Value = value
            };

            Create(model);
        }
 public void Delete(SettingsEntity model)
 {
     _settingsRepository.Delete(model);
 }