ASP.NET MVC 4 save 3 decimal place value to SQL Server 2005 -


i have set 3 decimal place in sql server 2005.i can set model part .but in sql server set datatype of salary property decimal.

 when set           public decimal salary { get; set; } 

it saved database 21000.000 not 21000. if put 30000.75, saved 30000.750.

apply attribute property in model:

[displayformat(dataformatstring = "{0:#,##0}")] 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -