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

Document snapshot model initialization breaking change #3030

Closed
AndriySvyryd opened this issue Jan 21, 2021 · 1 comment · Fixed by #3464
Closed

Document snapshot model initialization breaking change #3030

AndriySvyryd opened this issue Jan 21, 2021 · 1 comment · Fixed by #3464

Comments

@AndriySvyryd
Copy link
Member

See dotnet/efcore#22031

@AndriySvyryd AndriySvyryd self-assigned this Jan 21, 2021
@ajcvickers ajcvickers added this to the 6.0.0 milestone Jan 26, 2021
@AndriySvyryd
Copy link
Member Author

AndriySvyryd commented Mar 6, 2021

var snapshotModel = migrationsAssembly.ModelSnapshot?.Model;
if (snapshotModel != null)
{
    snapshotModel = context.GetService<IModelRuntimeInitializer>().Initialize(snapshotModel);
}

context.GetService<IMigrationsModelDiffer>().HasDifferences(
    snapshotModel?.GetRelationalModel(),
    context.GetService<IDesignTimeModel>().Model.GetRelationalModel());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants