Working with stored procedures with ref cursor out parameter

Working with stored procedures with ref cursor out parameter

Postby teddyFry » Wed 12 Oct 2011 12:41

Hi everyone!

I follow all the steps I've found in this article : http://www.devart.com/dotconnect/oracle ... rsors.html. To get a typed object or a collection of objects in return of the call of my stored procedures in place of the using of the cursor himself.

Everything works fine with the call of my stored procedures. However, when I update my model. I loose all the modications done in the .edmx file because the signatures of the stored procedures didn't match anymore.

Is there any solution to maintain the modifications made in the .edmx file while updating the model ?
teddyFry
 
Posts: 7
Joined: Wed 12 Oct 2011 12:33

Postby Shalex » Fri 14 Oct 2011 08:32

teddyFry wrote:Is there any solution to maintain the modifications made in the .edmx file while updating the model ?

We recommend you to use Entity Developer (*.edml) instead of EDM Wizard (*.edmx) because Entity Developer doesn't regenerate SSDL during Update Model From Database.

We will add the following information in our documentation:
-----------------------------------------------------
Migration between ADO.NET Entity Data Model (*.edmx) and Devart Entity Model (*.edml)
To Devart Entity Model: change the extension (edmx ->edml), set the Build Action property of your model to "DevartEntityDeploy", and Custom Tool=DevartEfGenerator. The *.edml model can be edited with the Devart Entity Developer tool.
To ADO.NET Entity Data Model: change the extension (edml ->edmx), Build Action=EntityDeploy, and Custom Tool=EntityModelCodeGenerator. The *.edmx model can be modified with Entity Designer.
Both *.edml and *.edmx can be opened and edited manually using XML Editor.
-----------------------------------------------------
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby wgkwvl » Fri 14 Oct 2011 12:38

great,

i was contemplating the migration but was dubious of how to begin with it.

Is the model.tt file reusable, or does the edml come with its own model file ?
wgkwvl
 
Posts: 39
Joined: Tue 20 Jul 2010 15:13

Postby Shalex » Fri 21 Oct 2011 12:55

Yes, it is reusable. Additionally to the steps which are mentioned above, do the following:
1) open the Model1.tt and Model1.Context.tt files in a text editor and change the string:
Code: Select all
string inputFile = @"Model1.edmx";

-->
Code: Select all
string inputFile = @"Model1.edml";

2) modify your %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude file:
Code: Select all
if (extension.Equals(".edmx", StringComparison.InvariantCultureIgnoreCase))

-->
Code: Select all
    if(extension.Equals(".edmx", StringComparison.InvariantCultureIgnoreCase) 
    || 
    extension.Equals(".edml", StringComparison.InvariantCultureIgnoreCase)) 
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby teddyFry » Tue 25 Oct 2011 14:00

Thank you very much for your responses. I've just include the edml file from Entity Developer in my project and the POCO model is well generated from my custom templates in Visual Studio.
teddyFry
 
Posts: 7
Joined: Wed 12 Oct 2011 12:33


Return to dotConnect for Oracle