I am trying to validate very simple method and I am getting The value \'null\' is not valid for Nullable`1 error.
[ValidateModel]
public IEnumerable
Calling it with / is the way to go. Calling it for /null is not what you want to do.
Here's what is happening behind the scenes:
/false
OK, let's see if I can convert that into a bool. Yes, I can.
/true
OK, let's see if I can convert that into a bool. Yes, I can.
/
OK, let's see if I can convert that into a bool. No, I can't, so use the default
value specified in the method arguments.
/null
OK, let's see if I can convert that into a bool. No, I can't, so throw an
exception.