Automatic update code first from the database model, is it possible?

I have first code classes generated from my existing db using ADO.NET Entity Data Model. I have now added some new tables to the database.

I want to know if it is possible to create related code classes from new db tables without re-creating the model from scratch?

+3


source to share


1 answer


Yes, as long as you use First Reverse Engineer Code to do it. It will create POCOs just like Code-First, but it will be based entirely on the current database. No .edmx file and T4 template. Code first only.



You should know, by the way, that this (along with the usual Code-First) will be the only one allowed in EF7. They get rid of a lot of things to try and shrink it, and both Model and Database-First got the ax (at least for now). This blog post from the Microsoft ADO.NET blog explains what, along with some other features.

+4


source







All Articles