Browse Source

-

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
80852ef15f
  1. 2
      Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs
  2. 4
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs

2
Src/Asp.Net/SqlServerTest/Models/DataTestInfo.cs

@ -122,7 +122,7 @@ namespace OrmTest.Models
/// Default:
/// Nullable:False
/// </summary>
public double Float1 {get;set;}
public float Float1 {get;set;}
/// <summary>
/// Desc:

4
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);

Loading…
Cancel
Save