我Quantity在SQL Server 2008的表中有一列.但我想在我的asp.net mvc web应用程序中编写一个数据注释,检查输入的值是否大于或等于1?那么有谁能告诉我使用哪种数据注释?
Quantity
谢谢
这有用吗?
[Range(1, Int32.MaxValue, ErrorMessage = "Value should be greater than or equal to 1")]