mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 14:15:50 +08:00
Update Core
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>sqlSugar</id>
|
||||
<version>4.2.1.6</version>
|
||||
<version>4.2.1.7</version>
|
||||
<title>SqlSugar SqlServer ORM</title>
|
||||
<authors>sun kaixuan</authors>
|
||||
<owners>landa</owners>
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
reval.Add((T)Convert.ChangeType(re.GetValue(0), type));
|
||||
reval.Add((T)Convert.ChangeType(re.GetValue(0),PubMethod.GetUnderType(type)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual bool IsAnySystemTablePermissions()
|
||||
{
|
||||
this.Context.Ado.CheckConnection();
|
||||
string sql = this.CheckSystemTablePermissionsSql;
|
||||
this.Context.Ado.CheckConnection();
|
||||
try
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ using System.Runtime.InteropServices;
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1c022a5c-4e4d-4026-a8a3-f659b9740a1a")]
|
||||
[assembly: AssemblyVersion("4.2.1.5")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.5")]
|
||||
[assembly: AssemblyVersion("4.2.1.7")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.7")]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>sqlSugarCore</id>
|
||||
<version>4.2.1.5</version>
|
||||
<version>4.2.1.7</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>Landa</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user