示例#1
0
        public ActionResult DetailsNews(int id, int catID)
        {
            List <News>    yakalananKategori = news_repo.Where(x => x.CategoryID == catID && x.ID != id).OrderByDescending(x => x.CreatedDate).ToList();
            List <Comment> yakalananYorum    = comment_repo.Where(x => x.NewsID == id).OrderByDescending(x => x.CreatedDate).ToList();

            return(View(Tuple.Create(news_repo.GetByID(id), yakalananKategori, yakalananYorum, new Comment())));
        }
示例#2
0
        public ActionResult UpdateNews(int id)
        {
            List <Category> kategori = cat_repo.Where(x => x.ID != 1);

            return(View(Tuple.Create(news_repo.GetByID(id), kategori)));
        }