private void SaveSetting(SettingsModel settingsModel) { var settingType = settingsModel.GetType(); if (_settingsMap.TryGetValue(settingType, out var targetType)) { var resolvedSettings = DependencyResolver.Resolve(targetType); _modelMapper.MapType(targetType, settingsModel, resolvedSettings); _settingService.Save(targetType, resolvedSettings, CurrentStore.Id); } }