public string GetPlanetSystemName(IDbConnection connection, int planetId)
        {
            var planetGeometry = _planetGeometryCache.GetById(connection, planetId, true);
            var systemDetail   = _systemDetailCache.GetById(connection, planetGeometry.SystemId, true);

            return(systemDetail.Name);
        }
Exemple #2
0
        public bool TryUpdateKey(IDbConnection connection, int systemId, string oldName, string newName,
                                 IGDetailSystemLocalStorageCache cache, bool updateParentCahce = true)
        {
            _checkAndInit(connection, cache);
            int id;

            if (!_storage.TryUpdateKey(oldName, newName, out id))
            {
                return(false);
            }
            if (!updateParentCahce)
            {
                return(true);
            }
            var user = cache.GetById(connection, id, true);

            user.Name = newName;
            var result = cache.UpdateLocalItem(connection, user);

            return(result.Name == newName);
        }