All my controller methods have this as the first couple of lines:
if (!ModelState.IsValid)
return BadRequest(ModelState);
Can I make this happen in the pipeline before a request gets to the controller? That way I can assume that the model is valid for all requests.
I use stuff in System.ComponentModel.DataAnnotations
namespace to annotate my DTO classes.