예제 #1
0
        /// <summary>
        ///     Get apps filtered by :
        ///     site.com/Apps/Apple-8/Games or
        ///     site.com/Apps/Apple-8 or
        ///     site.com/Apps/Apple/Games or
        ///     site.com/Apps/Apple
        /// </summary>
        /// <param name="platform"></param>
        /// <param name="platformVersion"></param>
        /// <param name="category"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        //[OutputCache(CacheProfile = "Day", VaryByParam = "platform;platformVersion;category;page")]
        public ActionResult GetByPlatformAndCategory(string platform, double?platformVersion, string category,
                                                     int page = 1)
        {
            var apps = _logics.GetAppsFilteredByPlatformAndCategory(platform, platformVersion, category, page, ViewBag,
                                                                    db);

            if (apps != null)
            {
                ViewBag.Title       = "Apps : " + _logics.GetCurrentUrlWithoutHostNameWithoutSlash();
                ViewBag.Meta        = ViewBag.Title;
                ViewBag.Keywords    = ViewBag.Meta;
                ViewBag.Apps        = apps;
                ViewBag.breadcrumbs = _logics.GetBredcrumbsBasedOnCurrentUrl();
                return(View("Index"));
            }
            return(View("_AppNotFound"));
        }