public Slug GetBySlug(string seoFriendlyName) { if (string.IsNullOrEmpty(seoFriendlyName)) { return(null); } string key = string.Format(URLRECORD_BY_ID_KEY, seoFriendlyName); return(_cache.Get(key, () => _slugRepository.GetBySlug(seoFriendlyName))); }
public Domain.DTO.BlogPost.BlogPostDetailDTO GetById(Guid Id) { if (Id == Guid.Empty) { throw new ArgumentNullException("neplatný objekt id"); } string key = string.Format(BLOGPOST_BY_ID_KEY, Id); return(_cache.Get(key, () => _blogpostRepository.GetDtoById(Id))); }
public Domain.Page GetById(Guid Id) { if (Id == Guid.Empty) { throw new ArgumentNullException("neplatný objekt id"); } string key = string.Format(PAGE_BY_ID_KEY, Id); return(_cache.Get(key, () => _pageRepository.GetById(Id))); }
public Domain.BlogSettings GetByKey(string key) { string cacheKey = string.Format(SETTING_BY_ID_KEY, key); return(_cache.Get(cacheKey, () => _settingsRepository.GetByKey(key))); }