Refactoring Repetitive Model Validation in ASP.NET Core
In one of my ASP.NET Core APIs, I was working with [FromBody] models that had a number of required fields, some were nullable integers, others were strings that needed to be non-empty. Initially, I handled validation directly in the controller action...
Jul 16, 20255 min read24


