7

Following my question Entity Framework Migration: Why does it ignore snapshot and take __MigrationHistory into account?, I'm confused why EF migrations stores previous model both in DB inside __MigrationHistory table and in resource files? And more confused why does it completely ignore resources and consider the table data to calculate model changes?

Community
  • 1
  • 1
Hans
  • 2,674
  • 4
  • 25
  • 48
  • Migrations are used to update the database. What good would it be if it didn't compare the code to the model? You have total control over when those changes get pushed out (update-database). You can also just generate scripts if you want to keep track yourself. Also, it doesn't ignore the resource file - that is the source with the database model being the target. You can pick a different source if you want to roll back to a prior version. – Steve Greene Jun 14 '15 at 15:03
  • It looks like completely different data to me in one vs the other. The resx xml node in question appears to be just a hash of the varbinary model stored in the database... or something like that. – Triynko Aug 26 '15 at 14:36

0 Answers0