I have a rather complicated (and customized) Entity Framework entity class library created, and I accidentally deleted an Entity class in the designer (and saved and closed it, and the project isn’t under source control).
I’d like to re-create the Entity class from the model, but I can’t see how to do this. I can’t drag items from the Model Browser or the Server Explorer into the designer to recreate them (like the Linq-to-SQL designer does) so I’m a bit stuck.
The only solution is to delete the EDMX and get VS to rebuild it from the database – but this is drastic and means I lose my customizations. Isn’t there an easier way?
In the EDMX designer pane right open context menu and select Update Model from Database…. Than in wizard select a table you want to add to your model.
Btw. if you deleted entity from designer it should not be visible in model browser. Model browser is just another view to EDMX.