I am trying to sort my search results by author last name, publication date (newest and oldest), title, most popular, and highest rated!
I used a n example and almost co
Your Index() is just returning the unsorted collection (after getting the collection and then sorting it, you toss it away and call the database again using return View(db.Books.ToList()); which returns an unsorted collection.
Index()
return View(db.Books.ToList());
Change the last line of your code to
return View(books);