From 80852ef15f2e1379b67c14e84fb6cc7803b1c610 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 23 Nov 2017 14:39:23 +0800 Subject: [PATCH] - --- Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs | 2 +- .../Abstract/DbBindProvider/IDataReaderEntityBuilder.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs b/Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs index 935aefaff..30cf9a7a0 100644 --- a/Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs +++ b/Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs @@ -122,7 +122,7 @@ namespace OrmTest.Models /// Default: /// Nullable:False /// - public double Float1 {get;set;} + public float Float1 {get;set;} /// /// Desc: diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs index 4c8ad3757..7012440d4 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs @@ -253,10 +253,8 @@ namespace SqlSugar case CSharpDataType.@float: case CSharpDataType.@double: CheckType(bind.DoubleThrow, bindProperyTypeName, validPropertyName, propertyName); - if (bindProperyTypeName == "double") + if (bindProperyTypeName.IsIn( "double", "single")) method = isNullableType ? getConvertDouble : getDouble; - if (bindProperyTypeName == "single") - method = isNullableType ? getConvertFloat : getFloat; break; case CSharpDataType.Guid: CheckType(bind.GuidThrow, bindProperyTypeName, validPropertyName, propertyName);