public ActionResult AllProducts(int?skip) { SanPhamModel sp = new SanPhamModel(); int skipnum = (skip ?? 0); IQueryable <SanPham> splist = sp.GetAll(); if (skipnum == 0) { splist = splist.OrderBy(r => r.MaSP).Skip(skipnum).Take(8); } else { splist = splist.OrderBy(r => r.MaSP).Skip(skipnum).Take(8); } if (splist.Any()) { return(PartialView("_ProductTabLoadMorePartial", splist)); } else { return(null); } }