Adding, Refreshing and Deleting Entities on an Entity Data Model
Adding Entities to an Entity Data Model
Rather than adding all database objects to an Entity Data Model on the first pass, you can add database objects over time as you need them. To update the model with a table, view, or stored procedure, just launch the Update Wizard by right-clicking the EDM and selecting Update Model from Database... from the shortcut menu.The Add tab of the wizard shows a list of Tables, Views, and Stored Procedures that have not yet been added to the model. Just choose the database object you want, and click Finish to add it to the model.
Refreshing Entities on an Entity Data Model
When you make changes to a database object from which you have previously generated an entity, you can refresh the model to include these changes. To refresh an entity, just launch the Update Wizard by right-clicking the EDM and selecting Update Model from Database... from the shortcut menu.The Refresh tab of the wizard shows a list of Tables, Views, and Stored Procedures that have already been added to the model. Just choose the database object you want to refresh, and click Finish to update the entity in the EDM.
Note that if you change the name of a column in the database, the Update Wizard will not refresh the existing property, but will add a new one. To get around this, you can delete the new property, and modify the entity mappings so the existing property points to the correct column.
Deleting Entities on an Entity Data Model
In the latest version of the Entity Framework you can now sucessfully delete entities from the Entity Data Model (this didn't work properly in Entity Framework version 1)© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 11/11/10
Comment or report problem with topic
