We are upgrading an old VB6 application which sits on a SQL Server 2005 database, to an Entity Framework solution. The database remains the same, except – we’re adding a new table. Is it possible with Entity Framework, to maintain the existing structure, when it gets installed on a client PC – and just add one new table?
Is this how Code First will work? Can I be 100% certain that no other tables will be modified?
i don’t think, the effort is worth it to switch to code-first if you have an existing database and want to add only one table.
it is possible to map code-first classes to an existing database (reverse engineer code first). actually, i’m not very experienced with that workflow, but i know you can. You have to deal with a lot of manual mapping (with DataAnnotations or Fluent API), so in your case i would recommend to use the Entity Framework Database First workflow, since adding a single table saves you a lot of work.
this link has some useful information: Arthur Vickers Blog – Don’t use Code first by mistake