Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating Model from Database doesn't work
Message
From
26/11/2012 06:55:20
 
General information
Forum:
ASP.NET
Category:
Entity Framework
Miscellaneous
Thread ID:
01557270
Message ID:
01558036
Views:
44
>>>>>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 :-{
>>
>>Thanks I had found an example of how to tweak the xml yesterday and got that part working. What a pain!
>
>When I initially started down the Entity Framework path I was fairly excited.
>
>Then reality set in. If you never change your schema (yeah - right), then it is convenient unless you use stored procedures. If you ever change your schema, all bets are off and you save time by NOT using EF.
>
>Haven't touched it since.

:) I'm pretty much going that way. I did find out how to manually update it, but it's such a pain.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform