protected override void DataPortal_Update() { using (var ctx = DalFactory.GetManager(DalManagerTypes.AppConfigManager)) { var dal = ctx.GetProvider <IAppConfigDal>(); using (BypassPropertyChecks) { var item = new AppConfigDto { BaseUri = BaseUri, ClientSecret = ClientSecret, DalManagerType = DalManagerType, DbInUse = DbInUse }; dal.Update(item); } } }
public void Update(AppConfigDto data) { // Open App.Config of executable Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); // Add Application Settings. config.AppSettings.Settings.Remove("DalManagerTypeAuthCode"); config.AppSettings.Settings.Add("DalManagerTypeAuthCode", data.DalManagerType); config.AppSettings.Settings.Remove("WSBaseUri"); config.AppSettings.Settings.Add("WSBaseUri", data.BaseUri); config.AppSettings.Settings.Remove("ClientSecret"); config.AppSettings.Settings.Add("ClientSecret", data.ClientSecret); config.AppSettings.Settings.Remove("DbInUse"); config.AppSettings.Settings.Add("DbInUse", data.DbInUse); // Save the configuration file. config.Save(ConfigurationSaveMode.Modified); // Force a reload of a changed section. ConfigurationManager.RefreshSection("appSettings"); }
public void Insert(AppConfigDto data) { throw new NotImplementedException(); }