Example #1
0
 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());
 }
Example #2
0
 // GET: Sach
 public ActionResult Index(int id)
 {
     return(View(sachRepo.GetAll().Where(x => x.MaCD == id).ToList()));
 }