4
Answers

Store specific decimal within asp.net core model

Marius Vasile

Marius Vasile

2y
545
1

Hi. I want to be able to store specific number of decimals in a model. What I have is

 

public decimal Cota { get; set; }

but how do I allow storage of 112.45 and prevent 112.4543 for example? only two digits after the point

Answers (4)