update model (EF4) from database

update model (EF4) from database

Postby 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.
HDumas
 
Posts: 18
Joined: Fri 23 Sep 2005 12:56
Location: Quebec, Canada

Postby 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).
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby 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.
HDumas
 
Posts: 18
Joined: Fri 23 Sep 2005 12:56
Location: Quebec, Canada

Postby 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!).
fni
 
Posts: 25
Joined: Wed 27 Jan 2010 13:20

Postby AndreyR » Tue 06 Jul 2010 12:20

We are working on this feature. Feel free to participate in our roadmap corrections here.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby 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?
bhav27
 
Posts: 20
Joined: Tue 20 Apr 2010 11:53

Postby 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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby 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.
bhav27
 
Posts: 20
Joined: Tue 20 Apr 2010 11:53


Return to dotConnect for Oracle