Ejemplo n.º 1
0
        public void GetResourceStarByResourceID()
        {
            PageViewCountService pageviewCountService = new PageViewCountService();
            PageViewCount        pageViewCount        = pageviewCountService.GetPageViewCountByResourceID("f3557d62-c521-48d4-9aea-5b23095b5005");;

            Assert.IsNotNull(pageViewCount);
        }
Ejemplo n.º 2
0
        public void PageViewCountUpdate()
        {
            PageViewCountService pageviewCountService = new PageViewCountService();
            PageViewCount        pageViewCount        = pageviewCountService.GetPageViewCountByResourceID("f3557d62-c521-48d4-9aea-5b23095b5005");

            pageViewCount.Count++;
            pageviewCountService.Update(pageViewCount);
        }
Ejemplo n.º 3
0
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (Session[id] == null)
            {
                HttpContext.Session.Add(id, id);
                pcs.PageViewDetails(id);
            }
            ViewBag.PageViewCount = pcs.GetPageViewCountByResourceID(id);
            Tutorials tutorials = tutorialsCRUD.GetTutorialsById(id);

            return(View(tutorials.ToModel()));
        }
Ejemplo n.º 4
0
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (Session[id] == null)
            {
                HttpContext.Session.Add(id, id);
                pcs.PageViewDetails(id);
            }
            ViewBag.PageViewCount = pcs.GetPageViewCountByResourceID(id);

            Article      article = articleCRUD.GetArticleById(id);
            ArticleModel am      = article.ToModel();

            ViewBag.PreArticle  = articleCRUD.GetPreArticle(article).ToModel();
            ViewBag.NextArticle = articleCRUD.GetNextArticle(article).ToModel();
            return(View(am));
        }