What's the way to add decimal number to SQL that replicate in EF?
I already tried with decimal(10,4)
and float
in the SQL but after I updated my Database model the EF treat
decimal(10,4) as a Decimal in C#
float as a Double in C#
witch for me it's great, but the Model Validation always fail
and it's not because I'm using .
instea开发者_Python百科d of ,
What should I do so the validation can run smoothly?
I know I can avoid this using a ModelView in between the View and the Model, but I just want to know how to do things right.
got the problem, it's not me... it's .NET really :)
http://haacked.com/archive/2011/03/19/fixing-binding-to-decimals.aspx
精彩评论