Jul 12, 2016 at 3:10 PM
Edited Jul 12, 2016 at 3:14 PM
Regarding the code below I'm trying to do paging using this framework via SelectPage.
The issue I'm having is that the 'out Param' totalCount is counting all entries in the database not just the ones which match the 'Where' criteria.
I cannot find any examples of SelectPage in source code tests.
var query = _repository.Query();
var result = query.OrderBy(p => _repository.Queryable()
.Where(x => (!x.Deleted) && (x.PostCode.Contains("37")))
.Include(t => t.OrderLines)
.OrderBy(order => order.Id))
.SelectPage(1, 10, out totalCount).ToList();