public ActionResult Index(int?page) { log.Debug("Debug message"); log.Warn("Warn message"); log.Error("Error message"); log.Fatal("Fatal message"); ViewBag.haberler = haberService.GetAll(); //var haberler = haberService.GetAll(); var pageNumber = page ?? 1; var haberler = this.haberService.GetAll().Where(f => f.IsActive == true).OrderBy(f => f.HaberSirano); var onePageOfPosts = haberler.ToPagedList(pageNumber, 2); return(View(onePageOfPosts)); }
// GET: Admin/Haber public ActionResult Index() { var haberler = haberService.GetAll(); return(View(haberler)); }