Wednesday, 6 February 2013

Entity Framework 5 Enable Migrations

Just taking another look at Entity Framework 5. It is nice to configure. I quite like the feature (which I think is borrowed from Rails) where you can enable migrations. This takes the pain out of updating your database. The seed method gives you a nice place to control the insertion of data into your site.?

The?AutomaticMigrationsEnabled = false; if set to true can automatically update your tables based on the entities. It's good for a small project but I suspect on any non trivial site you want to manage the database changes yourself.?

This is really just a reminder to myself as I often forget the package manager commands.?


No comments:

Comments System

Disqus Shortname