ModelValidation

In Visual Studio:

  1. In the PMC, run Update-Database
  2. Create a person. Validation fails.
  3. Remove the comment characters from //ModelState.Clear();
  4. Run the app again, validation works. cd ModelValidation

With the CLI:

Run migrations.

Start app using dotnet watch run

Navigate to https://localhost:5001/people

Add a person to test model validation behavior.