The issue comes with the default precision
and scale
. NHibernate default decimal
representation is decimal (28,5)
, so that's why the final INSERT statement contains only 5 decimal places. XML mapping
<property name="Lat" precision="23" scale="20" />
<property name="Lon" precision="23" scale="20" />
fluent:
...
.Precision(23)
.Scale(20)
Now the INSERT statement will be decimal (23,20)
.