Created
November 24, 2025 01:30
-
-
Save AnthonyGiretti/310a8fc7019d2f02f569ed929872331c to your computer and use it in GitHub Desktop.
ASP.NET Core DataAnnotation unifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Before ASP.NET Core 10, depending on the scenario: | |
| // Some attributes were ignored | |
| // Record struct parameters weren’t validated consistently | |
| // Constructor binding didn’t always trigger annotation checks. | |
| public readonly record struct UserInput( | |
| [Required] string Name, | |
| [Range(18, 99)] int Age); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment