ADO.Net Entity Framework Entity Designer – Update Model From Database
In CTP 1 of the ADO.Net Entity Framework Tools, once you generated a model from an existing database, and selected the database object to import into that model, you could not import any additional objects using the designer. You had to manually edit the mapping files that could have caused some errors in the model since its schema is very rich and therefore more complicated.
In the CTP 2 of the Entity Framework Tools, a new feature was added: Update Model From Database, that allows you to:
- Add new objects from the database (tables, views and stored procedures) to the storage mapping part of the model.
- Remove existing objects from the storage mapping.
- Update the storage mapping according to changes made in the database, since the storage mapping was generated.
To update the model from the database, click the Storage Model Node in the Model Browser, and choose the option Update Model From Database.
This will open a dialog that lets you define which database objects you want to add / update or remove from the storage model.