Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which datatype of C# is equivalent to money in SQL Server? [duplicate]

I am working on a project in ASP.NET MVC. I started in the middle of the project and so I got stuck in this. The data type of a column in SQL Server is money. I need to access that column through the model so what will be its best equivalent datatype in C#?

like image 933
Kovid Purohit Avatar asked Jul 21 '17 07:07

Kovid Purohit


1 Answers

System.Decimal. You can find other mappings in the documentation at https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/sql-clr-type-mapping#NumericMapping

like image 103
detaylor Avatar answered Nov 14 '22 21:11

detaylor