Working with stored procedures with ref cursor out parameter

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
teddyFry
Posts: 7
Joined: Wed 12 Oct 2011 12:33

Working with stored procedures with ref cursor out parameter

Post by 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 ?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by 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.
-----------------------------------------------------

wgkwvl
Posts: 39
Joined: Tue 20 Jul 2010 15:13

Post by 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 ?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by 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))  

teddyFry
Posts: 7
Joined: Wed 12 Oct 2011 12:33

Post by 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.

Post Reply