In Visual Studio:
- In the PMC, run
Update-Database
- Create a person. Validation fails.
- Remove the comment characters from
//ModelState.Clear();
- 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.