I'm working on a C# application that imports an Excel file to be uploaded by users of the application. My application uses Entity Framework and SQL Server 2008 database.
In my SQL Server database I have created a column to hold value in this format: 1,565,000.62
. I defined the column as decimal
hence a corresponding decimal
property has been created for the same in my entity class.
However, when I'm adding my values into my entity class, I get an invalid cast exception.
What's the best datatype to use for this type of value (C# and SQL Server)?