public IActionResult UrunList(int aktifSayfa = 1) { ViewBag.ToplamSayfa = (int)Math.Ceiling((double)_urunRepository.HepsiniGetir().Count / 28); ViewBag.AktifSayfa = aktifSayfa; return(View(_urunRepository.HepsiniGetir().OrderByDescending(I => I.Id).ToList().Skip((aktifSayfa - 1) * 28).Take(28).ToList())); }
public IActionResult Index(int aktifSayfa = 1) { // 30 ViewBag.ToplamSayfa = (int)Math.Ceiling((double)_urunRepository.HepsiniGetir().Count / 28); ViewBag.AktifSayfa = aktifSayfa; ViewBag.Sepet = HttpContext.Session.GetObject <List <SepetModel> >("sepet"); return(View(_urunRepository.HepsiniGetir().OrderByDescending(I => I.Id).ToList().Skip((aktifSayfa - 1) * 28).Take(28).ToList())); }
public IActionResult Index() { return(View(_urunRepository.HepsiniGetir())); }