When sending a request model to Net Core API from Angular app, it changes the floating point variable's value.
Here is the request body sent from Angular app.
And when it hits the net core api it changes to this.
The problem can be fixed by rounding in this case but I wonder if it will have harming affects with other values.
It seems like Quantity
has double
type. Change it to decimal
in order to precisely represent decimal values.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.