Ejemplo n.º 1
0
        // Run the methods for search
        public ActionResult Search(string keyword, string author, string genre, int page = 1)
        {
            // Search:
            SearchViewModel result = db.SearchForBooks(author, genre, keyword);

            result.Author = author;
            result.Genre  = genre;

            // Paging:
            if (result.Books.Count > 24)
            {
                result.BooksPaged = result.Books.ToPagedList(page, 24);
            }

            return(View("Search", result));
        }