public ActionResult Index() { ViewBag.listSachMoi = sachRepo.GetAll().OrderByDescending(x => x.Ngaycapnhat).Take(4).ToList(); ViewBag.listSachNoiBat = sachRepo.GetAll().OrderByDescending(x => x.Solanxem).Take(4).ToList(); return(View()); }
// GET: Sach public ActionResult Index(int id) { return(View(sachRepo.GetAll().Where(x => x.MaCD == id).ToList())); }