vrijdag 11 januari 2013

Entity framework 5 Migrations, Tips & Tricks




  1. The migrations itself are transactional (so when everything goes wrong, you get another shot).
  2. The migrations reinsert the data after the upgrade.
  3. When adding a required property to an existing entity a not-null column is added to the table. Existing records get a default value.
  4. When making an existing property required make sure all existing records  have a value for the soon to be not null column. If not the upgrade will result in an error.

Geen opmerkingen: