Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating Model from Database doesn't work
Message
De
24/11/2012 04:07:13
 
 
À
23/11/2012 14:50:20
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Divers
Thread ID:
01557270
Message ID:
01557900
Vues:
48
>>Hi,
>>
>>I am using VS 2008 and .NET 3.5
>>
>>I generated an Entity Data Model from my database successfully. I had to make some changes to the database (dropping a field and adding another to one table) and so I went back into the Entity Data Model and selected to Update Model from Database, but it doesn't do anything. I even tried deleting the affected table but that doesn't show up in the list of tables to add.
>>
>>Any ideas how to do this?
>
>
>Has no one else ever encountered this?

I've found this to be erratic at times :-}
Usually new fields show up.
But deleted fields are not removed. This, however, isn't a big problem since you can just remove the field in the designer.
Changing a field name results in the same thing - a new field is added with the new name but the old field is still there....
Bigger problems occur if, for example, relationships change....

All in all, it works great if you create from a stable database design (or create the DB from the model) - but if you are making frequent changes to the DB you'll eventually find yourself having to tweak the XML to avoid having to create a complete new model :-{
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform