inside db I have field which is decimal(9, 6)
Nhibernate save this data with losing last digit in format decimal(9, 5)
Question is how to map field using nhib. mapping by code to use precision 9,6
Property(
x=>x.Longitude
// precision and scale
);
you can set explicitly to this type precision and scale like this
Property(
x => x.Longitude,
m =>
{
m.Precision(9);
m.Scale(6);
}
);
or you can set in conventions to match all decimals in your app, this is outside of this question (just an idea).
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With