Update Core

This commit is contained in:
sunkaixuan
2017-07-21 12:37:37 +08:00
parent 1f761dc4e0
commit 9dda1a4a3a
8 changed files with 18 additions and 9 deletions

View File

@@ -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>

View File

@@ -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)));
}
}
}

View File

@@ -111,6 +111,7 @@ namespace SqlSugar
}
public virtual bool IsAnySystemTablePermissions()
{
this.Context.Ado.CheckConnection();
string sql = this.CheckSystemTablePermissionsSql;
this.Context.Ado.CheckConnection();
try

View File

@@ -10,5 +10,6 @@ namespace SqlSugar
public class QueryableAccessory
{
protected ILambdaExpressions _LambdaExpressions;
protected bool _RestoreMapping = true;
}
}

View File

@@ -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;
}

View File

@@ -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")]

View File

@@ -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>