public MainViewModel() { try { using (ApplicationSettingsRepository ctx = new ApplicationSettingsRepository()) { BaseViewModel.Instance.CurrentApplicationSettings = ctx.ApplicationSettings().Result.FirstOrDefault(x => x.Description == "WaterNut"); } } catch (Exception ex) { throw; } }
private BaseViewModel() { if (CurrentApplicationSettings == null && LicenseManager.UsageMode != LicenseUsageMode.Designtime) { using (var ctx = new ApplicationSettingsRepository()) { CurrentApplicationSettings = ctx.ApplicationSettings().Result.FirstOrDefault(); } if (CurrentApplicationSettings == null) { MessageBox.Show("No Default Application Settings Defined"); } } }