private void UpdateConfiguration(DBManager dbManager, KPIDefaultConfigRec data)
        {
            SP.DB.ContextWrapper(SP.Const.CFG_KPIConnectionString, dbKPIInstance =>
            {
                var tmpExEnvConfigList = dbKPIInstance._<KPIDefaultConfigAccessor>().SelectDefaultValue();
                tmpExEnvConfigList.ExternalEnviromentTimer = data.ExternalEnviromentTimer;
                tmpExEnvConfigList.IsExternalEnviromentEnabled = data.IsExternalEnviromentEnabled;
                tmpExEnvConfigList.IsPendingForProcessingEnabled = data.IsPendingForProcessingEnabled;
                tmpExEnvConfigList.PendingForProcessingTimer = data.PendingForProcessingTimer;
                tmpExEnvConfigList.AuthorUserID = SP.SessionContext.UserID;

                Entity<KPIDefaultConfigRec>.Update(dbKPIInstance.Get, tmpExEnvConfigList);
            });
        }
 public void Update(DBManager dbManager, KPIDefaultConfigRec data)
 {
     //lock to avoid concurrent actions
     lock (_locker)
     {
         UpdateConfiguration(dbManager, data);
     }
 }