public IActionResult Details(int id) { var article = _articleData.GetArticle(id); //var comments = _commentData.GetComments(id).ToList(); //var pagedList = PagingList.Create(comments, 2, page); var model = new ArticeViewModel(); model.Id = id; model.Title = article.Title; model.Author = article.Author; model.Category = article.Category; model.Comments = _commentData.GetComments(id).ToList(); model.Date = article.Date; model.Content = article.Content; ViewData["Id"] = model.Id.ToString(); return(View(model)); }
ArticleModel IAricleHandler.GetArticle(string category, string articleId) { return(_articleData.GetArticle(articleId, "")); }