public ActionResult ListaLibros() { using (var db = new dbPubs()) { return(View(db.vw_ListaLibro.ToList())); } }
// GET: Author public ActionResult Index() { using (var db = new dbPubs()) { var result = db.vw_AutoresMasVenden.OrderByDescending(x => x.cantidad).ToList(); return(View(result)); } }
// GET: Books public ActionResult Index(string title) { using (var db = new dbPubs()) { if (string.IsNullOrWhiteSpace(title)) { return(View(db.titles.ToList())); } else { return(View(db.titles.Where(x => x.title1.Contains(title)).ToList())); } } }