This is an issue I am facing which is causing loss of precision when storing in SQL Server database from C# Entity Framework.
- SQL Server Data Type is
decimal(20, 15)
- In C# Property is defined as
public decimal AssignedGrossBudget { get; set; }
- in C# value in variable (AssignedGrossBudget) is 34.09090909090909
- But in SQL Server table it is 34.090000000000000
What could be wrong? (I am using Entity Framework db.SaveChanges(); and SQLBulkCopy to store data from c# to SQL Server)
I want to store 34.09090909090909 instead of 34.090000000000000.
I checked by directly inserting in the table and it works.