[release/5.0] Fix missing code generation output for custom data annotation attributes #25176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #25156
Port of #25128
Description
When scaffolding code from a database provider-specific data annotation attributes are not generated.
Customer Impact
Users need to add the provider-specific data annotation attributes manually, this could be unfeasible for large schemas. In particular this affects the data annotations added in 5.0 to the Pomelo MySQL provider
How found
Reported by a customer.
Test coverage
Test coverage for this case has been added in this PR.
Regression?
No.
Risk
Low. The change only affect design-time tooling that generate source code. No quirk as it's unfeasible to turn it on when using the tools.