when using postsharp code contracts I have set a GreaterThan attribute to 0. I have an action with an id decorated with the GreaterThan contract
public virtual ActionResult Edit([GreaterThan(0)] int id)
when I call the http://localhost/Items/Edit/-1, I get the following error
The parameter 'id' must be greater than 0. Parameter name: id
when I call the http://localhost/Items/Edit/0 , I do not get that error.
It seems to be that the paramter is GreaterThan or equal to. I could set it to .5, but then my error message looks weird because it would say The parameter 'id' must be greater than 0.5