Exemplo n.º 1
0
        public ActionResult ShowSelectedArticle([Bind(Include = "ArticleId")] int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var repo                 = new ArticlesRepository();
            var articleResult        = repo.GetArticleById(id);
            var articleAndTagsToShow = new ArticleFullViewModel()
            {
                Article      = ArticlesRepository.CleanHashTags(articleResult),
                HashtagsList = repo.Hashtags(articleResult)
            };

            return(View(articleAndTagsToShow));
        }