Beispiel #1
0
 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));
     }
 }
Beispiel #3
0
 // 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()));
         }
     }
 }