EF Cannot convert double to single

后端 未结 1 1226
夕颜
夕颜 2021-01-05 10:16

Im getting an error:

\"The \'BomAmountTaxRate\' property on \'EoiQuote\' could not be set to a \'System.Double\' value. You must set this property t

相关标签:
1条回答
  • 2021-01-05 11:13

    A float in SQL is not the same as a float in .Net. If you look at table of SqlDbType Enumeration you will find that SQL float is equivalent to double type.

    Float->Double. A floating point number within the range of -1.79E +308 through 1.79E +308.

    from C# Reference:

    In .Net, a float is an alias for the System.Single type.

    -3.4 × 1038 to +3.4 × 1038

    0 讨论(0)
提交回复
热议问题