|
@ -1067,21 +1067,10 @@ namespace SqlSugar |
|
|
} |
|
|
} |
|
|
public virtual List<T> ToPageList(int pageIndex, int pageSize, ref int totalNumber) |
|
|
public virtual List<T> ToPageList(int pageIndex, int pageSize, ref int totalNumber) |
|
|
{ |
|
|
{ |
|
|
_RestoreMapping = false; |
|
|
var oldMapping = this.Context.MappingTables; |
|
|
List<T> result = null; |
|
|
totalNumber = this.Clone().Count(); |
|
|
int count = this.Count(); |
|
|
this.Context.MappingTables = oldMapping; |
|
|
_RestoreMapping = true; |
|
|
return this.Clone().ToPageList(pageIndex, pageSize); |
|
|
QueryBuilder.IsDisabledGobalFilter = UtilMethods.GetOldValue(QueryBuilder.IsDisabledGobalFilter, () => |
|
|
|
|
|
{ |
|
|
|
|
|
QueryBuilder.IsDisabledGobalFilter = true; |
|
|
|
|
|
if (count == 0) |
|
|
|
|
|
result = new List<T>(); |
|
|
|
|
|
else |
|
|
|
|
|
result = ToPageList(pageIndex, pageSize); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
totalNumber = count; |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
} |
|
|
public virtual List<T> ToPageList(int pageIndex, int pageSize, ref int totalNumber, ref int totalPage) |
|
|
public virtual List<T> ToPageList(int pageIndex, int pageSize, ref int totalNumber, ref int totalPage) |
|
|
{ |
|
|
{ |
|
|