update model (EF4) from database

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
HDumas
Posts: 18
Joined: Fri 23 Sep 2005 12:56
Location: Quebec, Canada

update model (EF4) from database

Post by HDumas » Wed 30 Jun 2010 20:30

Hello,

Using VS2010, EF4, MVC2.
We are using iterations for developping a new application. With each iteration, not only is the view part of the application updated, but the model part as well; which means that tables and views are added or modified as the application becomes bigger.
Can you tell me if there is any way with VS2010 to update my EF model (edml) with the modifications that were made to the Oracle DB...
Or do I REALLY have to create from database all over again.

Thank you.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 01 Jul 2010 09:43

We are working on the model updating functionality.
At the moment I recommend you to use the drag&drop functionality of Database Explorer, just delete the modified entity from the Store part of the model (using Model Explorer) and add it again (using Database Explorer).

HDumas
Posts: 18
Joined: Fri 23 Sep 2005 12:56
Location: Quebec, Canada

Post by HDumas » Fri 02 Jul 2010 13:05

Thank you very much... I had forgotten about the DataBase Explorer...
It will certainly work for now while we wait for the new feature.

fni
Posts: 25
Joined: Wed 27 Jan 2010 13:20

Post by fni » Tue 06 Jul 2010 09:44

I'm also eager to see an update function. Having to delete and re-add tables to update them is tiresome and risky (don't forget to set those storage patterns every time!).

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 06 Jul 2010 12:20

We are working on this feature. Feel free to participate in our roadmap corrections here.

bhav27
Posts: 20
Joined: Tue 20 Apr 2010 11:53

Post by bhav27 » Tue 13 Jul 2010 08:54

AndreyR wrote:We are working on the model updating functionality.
At the moment I recommend you to use the drag&drop functionality of Database Explorer, just delete the modified entity from the Store part of the model (using Model Explorer) and add it again (using Database Explorer).
Your solution does not seems to work for us. I've modified a table in the oracle database and renamed one of its column. Then I refreshed Database Explorer which then shows me the table with same columns as database.

However, when I drag and drop the table in the model the properties of the table created still have old field name in the database table. Can you please advice why is my model not being updated?

I've tried to restart VS2008 and also PC but still facing same problem. Is there anyway to update model manual i.e. the XML generated?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 13 Jul 2010 09:15

Please make sure that you have deleted the table from the Model.Store (go to Model Explorer). In the other case there should be the behaviour you describe.

bhav27
Posts: 20
Joined: Tue 20 Apr 2010 11:53

Post by bhav27 » Tue 13 Jul 2010 10:37

AndreyR wrote:Please make sure that you have deleted the table from the Model.Store (go to Model Explorer). In the other case there should be the behaviour you describe.
That worked fine. Thanks.

Post Reply