예제 #1
0
        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());
        }
예제 #2
0
            public override IQueryable <OldMedia> Query()
            {
                var oldMediaQuery = _oldMediaService.GetAll().AsQueryable();

                return(oldMediaQuery);
            }