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

惰性加载查询,可以使用join或left了 #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jhzou1
Copy link
Contributor

@jhzou1 jhzou1 commented Sep 2, 2023

//jhzou120230902 ****惰性加载查询,可以使用join或left了
var ilist = this.BaseRepository().FindListLinq(expression);
pagination.TotalCount = ilist.Count();
var pageData = (
from i in ilist.OrderByDescending(s => s.BaseCreateTime).Skip(pagination.SkipCount).Take(pagination.PageSize)
select i
).ToList();

        return pageData;

Copy link
Owner

@liukuo362573 liukuo362573 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好,抱歉,这么久才看,我发现有一点问题:

  1. 配置文件 appsettings.json 不要提交上来
  2. 你这个新加的方法和 public IQueryable IQueryable(Expression<Func<T, bool>> condition) where T : class, new() 有啥区别吗?

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

Successfully merging this pull request may close these issues.

2 participants