diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs index 0722f95db..ac46ccdde 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs @@ -264,6 +264,10 @@ namespace SqlSugar { return (T)Convert.ChangeType(dr.GetBoolean(i), type); } + else if (type == UtilConstants.LongType) + { + return (T)Convert.ChangeType(dr.GetInt64(i), type); + } else if (type == UtilConstants.GuidType) { string guidString = dr.GetString(i); diff --git a/Src/Asp.Net/SqliteTest/Config.cs b/Src/Asp.Net/SqliteTest/Config.cs index a506f50ff..37a7134bd 100644 --- a/Src/Asp.Net/SqliteTest/Config.cs +++ b/Src/Asp.Net/SqliteTest/Config.cs @@ -8,6 +8,6 @@ namespace OrmTest { public class Config { - public static string ConnectionString = @"DataSource=D:\MyGit\SqlSugar\Src\Asp.Net\SqliteTest\DataBase\SqlSugar4xTest.sqlite"; + public static string ConnectionString = @"DataSource=F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\Src\Asp.Net\SqliteTest\DataBase\SqlSugar4xTest.sqlite"; } } diff --git a/Src/Asp.Net/SqliteTest/DataBase/SqlSugar4xTest.sqlite b/Src/Asp.Net/SqliteTest/DataBase/SqlSugar4xTest.sqlite index 9333efda8..f46b7111c 100644 Binary files a/Src/Asp.Net/SqliteTest/DataBase/SqlSugar4xTest.sqlite and b/Src/Asp.Net/SqliteTest/DataBase/SqlSugar4xTest.sqlite differ diff --git a/Src/Asp.Net/SqliteTest/Models/DataTestInfo.cs b/Src/Asp.Net/SqliteTest/Models/DataTestInfo.cs index 935aefaff..da97930fe 100644 --- a/Src/Asp.Net/SqliteTest/Models/DataTestInfo.cs +++ b/Src/Asp.Net/SqliteTest/Models/DataTestInfo.cs @@ -130,6 +130,8 @@ namespace OrmTest.Models /// Nullable:True /// public double? Float2 {get;set;} + public long Long1 { get; set; } + public long? Long2 { get; set; } } } diff --git a/Src/Asp.Net/SqliteTest/SqlSugar4xTest.sqlite b/Src/Asp.Net/SqliteTest/SqlSugar4xTest.sqlite new file mode 100644 index 000000000..e69de29bb diff --git a/Src/Asp.Net/SqliteTest/UnitTest/DataTest.cs b/Src/Asp.Net/SqliteTest/UnitTest/DataTest.cs index 87f3b32e4..40685e8c9 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/DataTest.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/DataTest.cs @@ -37,8 +37,10 @@ namespace OrmTest.UnitTest Money2 = 8, Varbinary1 = new byte[] { 4, 5 }, Varbinary2 = null, - String = "string" + String = "string", + Long1=100 }; + var x = db.Queryable().Select(it => it.PK).ToList(); var id = db.Insertable(insertObject).ExecuteReturnIdentity(); var data = db.Queryable().InSingle(id); if ( @@ -48,6 +50,7 @@ namespace OrmTest.UnitTest insertObject.Float2 != data.Float2 || insertObject.Int2 != data.Int2 || insertObject.Money1 != data.Money1 || + insertObject.Long1!=data.Long1|| insertObject.Guid2!=data.Guid2|| string.Join(",", insertObject.Varbinary1) != string.Join(",", data.Varbinary1) || insertObject.String != data.String) diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqliteTest/DataBase/SqlSugar4xTest.sqlite b/Src/Asp.NetCore2/SqlSeverTest/SqliteTest/DataBase/SqlSugar4xTest.sqlite index 43c81a651..66fabaf3b 100644 Binary files a/Src/Asp.NetCore2/SqlSeverTest/SqliteTest/DataBase/SqlSugar4xTest.sqlite and b/Src/Asp.NetCore2/SqlSeverTest/SqliteTest/DataBase/SqlSugar4xTest.sqlite differ