private IQueryable <ContentPathCacheEntry> GetEntryByPathQuery(ContentPath path) { var pathString = path.ToString(); var pathHash = KnuthHash.CalculateHash(pathString); var pathCacheEntryQuery = ContentPathCacheEntries .Where(e => e.Hash == pathHash && e.Path == pathString); return(pathCacheEntryQuery); }
void IContentPathCache.UpdatePath(ContentPath oldPath, ContentPath newPath) { if (oldPath == null) { throw new ArgumentNullException("oldPath"); } if (newPath == null) { throw new ArgumentNullException("newPath"); } var cacheEntry = GetEntryByPath(oldPath); UpdatePathRecursive(oldPath.ToString(), newPath.ToString(), cacheEntry); _dbContext.SaveChanges(); }
private void SetPath(ContentPathCacheEntry cacheEntry, ContentPath path) { SetPath(cacheEntry, path.ToString()); }
private IQueryable<ContentPathCacheEntry> GetEntryByPathQuery(ContentPath path) { var pathString = path.ToString(); var pathHash = KnuthHash.CalculateHash(pathString); var pathCacheEntryQuery = ContentPathCacheEntries .Where(e => e.Hash == pathHash && e.Path == pathString); return pathCacheEntryQuery; }