Search code examples
entity-frameworkcode-firstentity-framework-ctp5

Entity Framework Feature CTP5 Append Model?


I am using EF Feature CTP5 and need to be able to just append changes to the database structure when making changes to the model or my class objects?

Is there a way to do this or does it need to drop and recreate the database every time you make a change to the class objects?


Solution

  • No, as of CTP5 only DropCreateDatabaseAlways and DropCreateDatabaseIfModelChanges strategies are supported which essentially recreate your DB every time.

    That said, EF team is actively working on a Code First Database Evolution (aka Migrations) feature which is exactly what you are looking for: Altering DB instead of dropping it. We likely get this feature in the RTM this year.