// tüm sayfaların listesi public ActionResult PageList() { if (Convert.ToInt32(Session["RolId"].ToString()) == 1) { return(View(_pagesService.GetAll())); } else { return(RedirectToAction("News", "News")); } }
public PartialViewResult Stats() { int booksCount = booksService.GetAll().Count(); int pagesCount = pagesService.GetAll().Count(); var model = new StatsViewModel() { BooksCount = booksCount, PagesCount = pagesCount }; return(this.PartialView("_StatsViewPartial", model)); }