1
Vote

The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.

description

There is a bug when using the SelectPage method.
public async Task<ActionResult> Index(int page = 1, int pageSize = 10)
        {
            var totalCount = 0;
            
var vModel = Mapper.Map<IEnumerable<Membership>, IEnumerable<MembershipViewModel>>(_membershipService.Query().SelectPage(page, pageSize, out totalCount));

            return View(vModel);
        }
==

The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.

comments