public ActionResult Index(string url) { var oldMediaUrlsDict = MemoryCacheHelper.GetCachedData(MemoryCacheHelper.CacheConsts.OldMediaUrls, () => _oldMediaService.GetAll().ToDictionary(x => x.OldPath)); if (oldMediaUrlsDict.ContainsKey(url)) { return(RedirectPermanent(oldMediaUrlsDict[url].NewPath)); } return(HttpNotFound()); }
public override IQueryable <OldMedia> Query() { var oldMediaQuery = _oldMediaService.GetAll().AsQueryable(); return(oldMediaQuery); }