This commit is contained in:
sunkaixuan
2017-11-23 14:39:23 +08:00
parent 457df6b147
commit 80852ef15f
2 changed files with 2 additions and 4 deletions

View File

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

View File

@@ -253,10 +253,8 @@ namespace SqlSugar
case CSharpDataType.@float: case CSharpDataType.@float:
case CSharpDataType.@double: case CSharpDataType.@double:
CheckType(bind.DoubleThrow, bindProperyTypeName, validPropertyName, propertyName); CheckType(bind.DoubleThrow, bindProperyTypeName, validPropertyName, propertyName);
if (bindProperyTypeName == "double") if (bindProperyTypeName.IsIn( "double", "single"))
method = isNullableType ? getConvertDouble : getDouble; method = isNullableType ? getConvertDouble : getDouble;
if (bindProperyTypeName == "single")
method = isNullableType ? getConvertFloat : getFloat;
break; break;
case CSharpDataType.Guid: case CSharpDataType.Guid:
CheckType(bind.GuidThrow, bindProperyTypeName, validPropertyName, propertyName); CheckType(bind.GuidThrow, bindProperyTypeName, validPropertyName, propertyName);