Data type for currency in entity structure

What data type should I use to store currency values ​​in Entity Framework 6 and what data type should it display in SQL Server 2012?

Thanks Miguel

+3
source share
1 answer

To have exact values, use decimalin C # as well as decimal(m, n)in SQL Server. floator doubleor realsimply inaccurate and susceptible to rounding errors - I would not have avoided this.

See this other SO question (and its answers) for a discussion of money and decimals in SQL Server and why you should avoid it moneyin SQL Server.

+7
source

All Articles