/// <summary> /// Seed app settings - user level types /// </summary> private void SeedUserSettings() { // Dashboard Buttons Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardButtonsPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardButtonsPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Dashboard Notifications Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardNotificationsPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardNotificationsPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Dashboard All Assets Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsPieChartPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsPieChartPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Dashboard All Assets Obsolete Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsObsoleteChartPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsObsoleteChartPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Dashboard WarrantyExpiry Obsolete Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsWarrantyExpiryChartPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsWarrantyExpiryChartPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Dashboard Wishlist Panel if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsWishlistStatsPanel.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.DashboardAssetsWishlistStatsPanel.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.User, SettingType = EnumHelper.ApplicationSettingType.Dashboard, //Value = "true" }; _context.Settings.Add(appSetting); _context.SaveChanges(); } }
/// <summary> /// Seed app settings - global types /// </summary> private void SeedApplicationSettings() { // Email Service User Name if(!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceUserName.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceUserName.ToString(), DataType = EnumHelper.AppSettingDataType.String, //ScopeType = EnumHelper.AppSettingScopeType.Application, SettingType = EnumHelper.ApplicationSettingType.Email }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Email Service Key Code if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceKeyCode.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceKeyCode.ToString(), DataType = EnumHelper.AppSettingDataType.SecureString, //ScopeType = EnumHelper.AppSettingScopeType.Application, SettingType = EnumHelper.ApplicationSettingType.Email }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Email Service Sender Email Address if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceSenderEmailAddress.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceSenderEmailAddress.ToString(), DataType = EnumHelper.AppSettingDataType.String, //ScopeType = EnumHelper.AppSettingScopeType.Application, //Value = HIResources.Strings.DefaultAppEmailAddress, SettingType = EnumHelper.ApplicationSettingType.Email }; _context.Settings.Add(appSetting); _context.SaveChanges(); } // Email Service Online Type if (!_context.Settings.Any(x => x.Key.Equals(Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceOnlineType.ToString(), StringComparison.CurrentCultureIgnoreCase))) { Setting appSetting = new Setting { Key = Helpers.EnumHelper.ApplicationSettingKeys.EmailServiceOnlineType.ToString(), DataType = EnumHelper.AppSettingDataType.Bool, //ScopeType = EnumHelper.AppSettingScopeType.Application, //Value = "false", SettingType = EnumHelper.ApplicationSettingType.Email }; _context.Settings.Add(appSetting); _context.SaveChanges(); } }