mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
4.2.1.7
This commit is contained in:
parent
fb32fc3a6e
commit
1f761dc4e0
@ -10,5 +10,6 @@ namespace SqlSugar
|
||||
public class QueryableAccessory
|
||||
{
|
||||
protected ILambdaExpressions _LambdaExpressions;
|
||||
protected bool _RestoreMapping = true;
|
||||
}
|
||||
}
|
||||
|
@ -490,8 +490,11 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual DataTable ToDataTablePage(int pageIndex, int pageSize, ref int totalNumber)
|
||||
{
|
||||
_RestoreMapping = false;
|
||||
totalNumber = this.Count();
|
||||
return ToDataTablePage(pageIndex, pageSize);
|
||||
var result = ToDataTablePage(pageIndex, pageSize);
|
||||
_RestoreMapping = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual List<T> ToList()
|
||||
@ -516,11 +519,15 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual List<T> ToPageList(int pageIndex, int pageSize, ref int totalNumber)
|
||||
{
|
||||
_RestoreMapping = false;
|
||||
List<T> result = null;
|
||||
totalNumber = this.Count();
|
||||
if (totalNumber == 0)
|
||||
return new List<T>();
|
||||
result = new List<T>();
|
||||
else
|
||||
return ToPageList(pageIndex, pageSize);
|
||||
result = ToPageList(pageIndex, pageSize);
|
||||
_RestoreMapping = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual KeyValuePair<string, List<SugarParameter>> ToSql()
|
||||
@ -671,7 +678,7 @@ namespace SqlSugar
|
||||
}
|
||||
protected void RestoreMapping()
|
||||
{
|
||||
if (IsAs)
|
||||
if (IsAs && _RestoreMapping)
|
||||
{
|
||||
this.Context.MappingTables = OldMappingTableList == null ? new MappingTableList() : OldMappingTableList;
|
||||
}
|
||||
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.2.1.6")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.6")]
|
||||
[assembly: AssemblyVersion("4.2.1.7")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.7")]
|
||||
|
Loading…
Reference in New Issue
Block a user