diff --git a/Src/Asp.Net/SqlServerTest/Demos/1_Query.cs b/Src/Asp.Net/SqlServerTest/Demos/1_Query.cs index 5197e70d3..4cdc7497b 100644 --- a/Src/Asp.Net/SqlServerTest/Demos/1_Query.cs +++ b/Src/Asp.Net/SqlServerTest/Demos/1_Query.cs @@ -164,7 +164,7 @@ namespace OrmTest.Demo var getFirstOrDefault = db.Queryable().First(); var getByWhere = db.Queryable().Where(it => it.Id == 1 || it.Name == "a").ToList(); var getByFuns = db.Queryable().Where(it => SqlFunc.IsNullOrEmpty(it.Name)).ToList(); - var sum = db.Queryable().Sum(it => it.Id); + var sum = db.Queryable().Select(it => it.SchoolId).ToList(); var sum2 = db.Queryable((st,sc)=>st.SchoolId==sc.Id).Sum((st,sc) => sc.Id); var isAny = db.Queryable().Where(it => it.Id == -1).Any(); var isAny2 = db.Queryable().Any(it => it.Id == -1); diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs index 22300c3c8..6cb1a8bd4 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs @@ -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))); } } } diff --git a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs index bd60abd3d..6525a91bd 100644 --- a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs +++ b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs @@ -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.5")] -[assembly: AssemblyFileVersion("4.2.1.5")] +[assembly: AssemblyVersion("4.2.1.6")] +[assembly: AssemblyFileVersion("4.2.1.6")]