标签:str 分页查询 分页 psi list() list turn text log
public PageInfo Get(string name, int PageIndex = 1, int PagepSize = 3)
{
PageInfo pg = new PageInfo();
if (name == null)
{
name="";
}
int count = pg.Data.Where(p => p.Title.Contains(name)).Count();
int PageCount = count / PagepSize + (count % PagepSize == 0 ? 0 : 1);
var list = pg.Data.Where(p => p.Title.Contains(name)).OrderBy(p => p.Time).Skip((PageIndex - 1) * PagepSize).Take(PagepSize).ToList();
LogHelper.TextWriter("查询并显示数据");
return pg;
}
标签:str 分页查询 分页 psi list() list turn text log
原文地址:https://www.cnblogs.com/cf425/p/13215631.html