How to update correctly an Entity Model after changes of database structure?

Posted by Slauma on Stack Overflow See other posts from Stack Overflow or by Slauma
Published on 2010-04-06T12:28:28Z Indexed on 2010/04/06 12:33 UTC
Read the original article Hit count: 916

I've made some changes in the table structure and especially the relationships between tables in my SQL Server database. Now I want to update my Entity model based on this new database structure.

Right clicking on the edmx file I find the option "Update model from database". But when I do this I get kind of a 50% update: The new columns appear in the Entity classes but I am confused about a lot of navigation properties which are still there in the model although the corresponding foreign key relationships do not exist anymore in the database.

Am I doing something wrong? Or is there another option to update the model including deletion of navigation properties? Or do I have to delete those navigation properties manually in the model files?

I am using Entity Framework Version 1 (VS 2008 SP1).

Thanks for help in advance!

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about entity-model