-
Notifications
You must be signed in to change notification settings - Fork 97
decimal parameters formatted incorrectly #382
Comments
Looks like we need to add the following. partial class SqliteSqlGenerationHelper
{
protected overrride string DecimalFormat => "G";
} BUT this is only the tip of the iceberg. Any arithmetic operation will coerce the values into |
Oh wait, the above code probably isn't sufficient. They need to be |
We should review all literals too--we had anther issue with |
It looks like
|
@smitpatel the logic used by Microsoft.Data.Sqlite is |
From @smitpatel on June 29, 2017 23:54 This should be fixed in SQLite to allow lossless arithmetic operations. |
|
Fixed by #381 |
From @Mats391 on April 18, 2017 12:16
When I insert a decimal value into a Sqlite database using EntityFramework Core, it will save it in a
Text
column. This is fine and prevents loss of data, but sometimes makes you unable to find a value you added beforeSteps to reproduce
It adds the value as
"3"
into the database, but uses"3.0"
in the query. It seems to not use the sameToString()
Further technical details
EF Core version: 1.1.1
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: Win7 x86
IDE: Visual Studio 2017
Edit:
This works for some reason:
Copied from original issue: dotnet/efcore#8205
The text was updated successfully, but these errors were encountered: