Rounding the structure of an object

One of my object objects (EF4) has a property that is decimal. Field in the database - Decimal (18,2)

If I set the value to 30.4777, it will only send 30.47 to db in the insert statement (as confirmed by the tracer). Is there a way to get it to send 30.4777, and then just let the database round it up (which seems happy otherwise)?

+4
source share
1 answer

You can set the Precision and Scale properties of your decimal field yourself. Just right-click a property in the designer and select Properties . In the properties window, you will find Precision and Scale . Set Scale to 4 and repeat your requests.

+2
source

All Articles