Skip to content

GetPagedList orderBy parameter #144

Description

@BrianARice

My database table Plan has a column called SortBy that I want to use to order the request... the below code is giving me the error: 'IQueryable' does not contain a definition for 'SortBy' and no accessible extension method 'SortBy' accepting a first argument of type 'IQueryable' could be found (are you missing a using directive or an assembly reference?)

        var repoPlan = _unitOfWork.GetRepository<Plan>();
        var list = repoPlan.GetPagedList(predicate: p => p.IsActive == true, orderBy: p => p.SortBy, pageIndex: skip, pageSize: take);

Any help on how to do this properly?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions