Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/5.0] Fix missing code generation output for custom data annotation attributes #25176

Merged
merged 1 commit into from Jul 6, 2021

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Jun 29, 2021

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.

* Fixes missing code generation output for custom data annotation attributes.
* Adds regression tests.

The two regression tests currently skip the assembly build process, because the two custom data annotation attributes do not exist in the generated assembly. If necessary, the `Microsoft.EntityFrameworkCore.Design.Tests` assembly could be added as a reference or additional source code files (containing the attributes) could be added to the build process.

Fixes #25156
@dougbu dougbu merged commit 0e28884 into release/5.0 Jul 6, 2021
@dougbu dougbu deleted the Issue25156 branch July 6, 2021 22:11
@dougbu dougbu added this to the 5.0.x milestone Oct 5, 2021
@smitpatel smitpatel removed this from the 5.0.x milestone May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants