Search code examples
entity-frameworkef-database-first

How does EF DB First works for subsequent updates into DB?


Generating POCO from db works like a charm, however what if further tables / columns are added into DB.

How to perform incremental updates of POCO in case of EF DB first?

Here are two alternatives I could think of:

  1. Or shall we fall back to code-first style from there onwards?
  2. or just keep adding incremental columns / tables manually into respectively into POCO?

Solution

  • The generated classes are partial, so you can just overwrite them with any schema changes in the database.