Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does money map to float well?

does the sql data type money map to c# float?

like image 526
mrblah Avatar asked May 21 '26 04:05

mrblah


1 Answers

No...it maps to a decimal. If the column allows null, it maps to Nullable<Decimal>.

Mapping CLR Parameter Data

float isn't precise enough to be used for monetary calculations. You'd be losing/gaining money all over the place.

like image 197
Justin Niessner Avatar answered May 23 '26 18:05

Justin Niessner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!