PagedList error: The method 'OrderBy' must be called before the method 'Skip'
问题 Here's the full error message: The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip' In the "PurchaseOrderController" I have added this code to the index method: // GET: PurchaseOrder public ActionResult Index(int? page) { return View(db.PurchaseOrders.ToPagedList(page ?? 1, 3)); } Also in the Index View for "PurchaseOrders" I have added this code: @using PagedList; @using PagedList.Mvc; @model IPagedList