If an empty request is sent to the action below, the parameter "p" is null, and there are no model errors, since [Required] (and I assume other Data Annotation attributes) are not enforced for action parameters. It'd be nice to have that to have one single place for checking input errors (model state), instead of in this case having to make two checks (p != null and check model state).
public string Post([Required] Person p) {
...
}
Comments: +1 Could anyone suggest a workaround for RC?
public string Post([Required] Person p) {
...
}
Comments: +1 Could anyone suggest a workaround for RC?