Marius Vasile

Marius Vasile

  • 601
  • 1.9k
  • 142.8k

Store specific decimal within asp.net core model

Dec 1 2022 10:05 AM

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)