开发者

Decimals in schema generated by EF being set to 0 decimal places?

I've noticed that whenever I generate a database schema from an EF model that includes decimal fi开发者_如何学JAVAelds the SQL type used is decimal(18,0) - this causes all decimal values to be effectively truncated to integers on persistence to the database.

Is there a configuration option or setting that can be applied to control the default precision of all SQL decimal types that are generated?


You can change scale and precision in the designer. Select the property in your entity and in Properties window change values as you need.

Decimals in schema generated by EF being set to 0 decimal places?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜