Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPagedListAsync predicate cannot use included properties #69

Closed
MohitSahore opened this issue Mar 30, 2018 · 0 comments
Closed

GetPagedListAsync predicate cannot use included properties #69

MohitSahore opened this issue Mar 30, 2018 · 0 comments

Comments

@MohitSahore
Copy link

`Expression<Func<Company, bool>> predicate = c => c.Owner.Id == ownerId;

        return await _unitOfWork.GetRepository<Company>().GetPagedListAsync(
            predicate: predicate,
            include: company => company.Include(c => c.Owner)
            pageIndex: page ?? 0,
            pageSize: pageSize ?? 10);`

Owner in the predicate is not loaded and is null.
How to achieve this filtering? I used the selector in place of predicate but the result had null entries.

@rigofunc rigofunc closed this as completed Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants