开发者

Money type 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜