public void UpdateWidgetSettings() { foreach (var widgetDefault in Widget.WidgetDefaults) { var setting = WidgetSettings.FirstOrDefault(e => e.WidgetDefaultId == widgetDefault.WidgetDefaultId); if (setting == null) { WidgetSettings.Add(CreateFrom(widgetDefault)); } } }
private WidgetSetting GetSettingByName(string settingName) { var widgetDefault = Widget.WidgetDefaults.FirstOrDefault(e => e.SettingName.ToLower() == settingName.ToLower()); return(WidgetSettings.FirstOrDefault(t => t.WidgetDefaultId == widgetDefault.WidgetDefaultId)); }
private WidgetSetting GetSettingById(string settingId) { return(WidgetSettings.FirstOrDefault(e => e.WidgetSettingId == settingId)); }