Entity Framework maps the float datatype into double

后端 未结 2 1984
旧巷少年郎
旧巷少年郎 2020-12-17 14:32

I am working on an asp.net mvc 3 web application using database-first approach.

I have a table called Results that contains two columns (min &

2条回答
  •  孤城傲影
    2020-12-17 14:48

    This is normal behaviour, as per MSDN.

    Even SQL-server's real datatype is mapped to double, even though float would definitely be enough there.

    But the type names are very confusing here. In fact float (t-SQL) is the same as double (.Net): a precision of 15 digits and a range of negative 1.79769313486232e308 to positive 1.79769313486232e308.

提交回复
热议问题