Exemple #1
0
        public bool TryUpdateKey(IDbConnection connection, IAllianceNameSerchItem newVal, string oldKeyName,
                                 string newKeyName, IAllianceLocalStorageCache cache, bool updateParentCahce = true)
        {
            _checkAndInit(connection, cache);
            IAllianceNameSerchItem val;

            if (!_storage.TryUpdateKey(oldKeyName, newKeyName, out val))
            {
                return(false);
            }
            if (!updateParentCahce)
            {
                return(true);
            }
            var alliane = cache.GetById(connection, newVal.Id, true);

            alliane.Name = newKeyName;
            var result = cache.UpdateLocalItem(connection, alliane);

            return(result.Name == newKeyName);
        }
Exemple #2
0
 private AllianceDataModel _updateAllianceInfo(IDbConnection connection, AllianceDataModel allianceInfo)
 {
     return(_aCache.UpdateLocalItem(connection, _aRepo.AddOrUpdateeModel(connection, allianceInfo)));
 }