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/7.0] Use correct provider type for nullable value type with converter #30219

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

ajcvickers
Copy link
Member

@ajcvickers ajcvickers commented Feb 6, 2023

Port of #29746
Fixes #29985

Description

In EF7, processing seed data in the model snapshot could result in an incorrect provider type when the property has a converter. This change ports a fix already in EF8 to ensure provider types are used correctly.

Customer impact

Many customers reporting that models with seed data will continually update this data on every migration, even though the data never changes. This means every generated migration contains Up and Down steps, even when the migration should be empty. No reasonable workaround.

How found

Multiple customer reports on 7.0.

Regression

Yes.

Testing

New tests added for this kind of seed data in the model snapshot.

Risk

Medium. Significant code changes, but these changes have been in the 8.0 code for several months now, and they are quirked here.

@ajcvickers ajcvickers changed the base branch from main to release/7.0 February 6, 2023 18:56
@dougbu
Copy link
Member

dougbu commented Feb 7, 2023

@ajcvickers has this PR been servicing approved but not marked as such❔

@ajcvickers
Copy link
Member Author

Not approved yet.

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.

Entity Framework Core 7 keeps creating the same migration for Nullable DateTime field
4 participants