You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in overflow in SQL when Quantity >= 1000000
Because the result in SQL has a precision of 24 (where the last 12 digits
are always zero) we risk unnecessary overflow in .NET.
1000 * 100.000000000001 => 100000,000000001000000000000000
EF Core version: 3.1.9
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 3.1
Operating system: Windows 10
IDE: Microsoft Visual Studio Enterprise 2019 Version 16.7.7
The text was updated successfully, but these errors were encountered:
source code:
EFCoreCASTing.zip
Linq query to an SQL database table where Quantity is an integer and ItemPrice is a decimal(18,12)
results in a CAST in the generated SQL
This results in overflow in SQL when Quantity >= 1000000
Because the result in SQL has a precision of 24 (where the last 12 digits
are always zero) we risk unnecessary overflow in .NET.
1000 * 100.000000000001 => 100000,000000001000000000000000
EF Core version: 3.1.9
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 3.1
Operating system: Windows 10
IDE: Microsoft Visual Studio Enterprise 2019 Version 16.7.7
The text was updated successfully, but these errors were encountered: