public ActionResult SearchByName(string term) { var sp = new SanPhamModel(); var lst = sp.SearchByName(term); var splist = (from p in lst orderby p.Id descending select new { MaSP = p.Id, p.TenSP, p.GiaTien, p.AnhDaiDien }).Take(5); return(Json(splist, JsonRequestBehavior.AllowGet)); }