开发者

Money type out of interval

开发者 https://www.devze.com 2023-03-17 10:22 出处:网络
I have an mssql table with money type column. I\'m trying to update that and getting the error \"1000000,000 is out of interval\".

I have an mssql table with money type column. I'm trying to update that and getting the error "1000000,000 is out of interval". Here is the code:

TradingResult trading = new TradingResult() { Id = 1 };
trading.Price = 1000000.00M;
contex开发者_C百科t.Trading.Attach(trading);
context.Entry(trading).Property(o => o.Price).IsModified = true;
context.SaveChanges();

Works fine when price has one less zero or try to update via query analyzer. I think the problem is the precision param, how can i change this ?

0

精彩评论

暂无评论...
验证码 换一张
取 消