c# - Why doesn't Entity Framework round a 2 decimal place decimal when storing -


this question has answer here:

is able please explain why ef doesn't round decimal default when value been stored has more decimal places max decimal places in db field.

it common sense sort of application round decimal when store-able decimals (decimals configured in db field) shorter calculated value needed stored.

at moment me seems though ef treating decimal string , truncating value when storing database table.

edit/answer: struggling on looking easy fix:

i looking disables truncating.

    public unitofwork(string connectionstring)     {         datacontext = new dbcontext(connectionstring);         sqlproviderservices.truncatedecimalstoscale = false;     } 

the answer question here expected: entity framework code first truncating decimals

because truncating normal behaviour.
http://entityframework.codeplex.com/workitem/735


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -