I am trying to display a filtered list of of products, based on Category filter and ItemsPerPage but I\'m having some issues when trying to use it with PagedList.
So
You will still likely have to ask for a count separately.
var products = repository.Products .Where(p => this.CurrentCategory == null || p.Category == this.CurrentCategory); var numProds = products.Count(); var mypage = products.OrderBy(p => p.ProductID) .Skip((page -1) * PageSize) .Take(PageSize);