You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class PagedData<TRecord>
{
public PagedData()
{
}
public PagedData(int pageSize, int pageNow)
{
PageSize = pageSize;
PageNow = pageNow;
TotalCount = 0;
Records = Enumerable.Empty<TRecord>();
}
public int PageSize { get; set; }
public int PageNow { get; set; }
public int TotalCount { get; set; }
public IEnumerable<TRecord> Records { get; set; }
}
那么会进行两次查询:
先查询总记录数,结果映射到TotalCount上
再查询分页的记录,结果映射到Records 上
The text was updated successfully, but these errors were encountered:
鉴于最新版本已支持多查询返回多个对象,现在提议一个特性,就是在DyRepository中的方法执行多条查询时,可以把多个结果映射到一个实体的不同属性上。
例如返回类型是以下类型:
那么会进行两次查询:
The text was updated successfully, but these errors were encountered: