Execution of Function Inside a Package with EF

Execution of Function Inside a Package with EF

Postby Cory.Allison » Fri 05 Aug 2011 16:02

I was wondering if someone could point me in the direction of the documentation or code sample for executing a package function using the EF provider for Oracle.

I am able to import the function, and I found documentation relating to returning a ref cursor, but was unable to find an example relating to a simple function that returns a Number value.

Regards,

Cory Allison
Cory.Allison
 
Posts: 1
Joined: Fri 05 Aug 2011 15:55

Postby jyuma » Sat 06 Aug 2011 16:19

Well put. I am experiencing the same problem at this very moment. It would be nice to know if this is possible at all (in which case I will stop wasting my time on it) or if there are any kind of examples out there of calling a Function in an Oracle Package through the sql text editor of the CommandText property.

I can create a method, but I am unable to drag it to the designer surface.
jyuma
 
Posts: 1
Joined: Sat 06 Aug 2011 16:07

Postby Shalex » Mon 08 Aug 2011 17:23

Our Stored Function Returning REF CURSOR tutorial describes a more comprehensive case of using stored procedures.
In a simple case, just drag&drop a stored procedure from Tools > Entity Developer > Database Explorer, make sure that this procedure has appeared in the Store and Conceptual parts of your model in Tools > Entity Developer > Model Explorer. Then save the model, create in the code an instance of your context, and call the method.
This is actual for the "Devart Entity Model" item. If you add the function in "Entity Developer: Create Model Wizard", it will be added only to the Store part of your mode. Just drag&drop it from the Store part in Model Explorer to the diagram surface - this will add it to the Conceptual part.
jyuma wrote:I can create a method, but I am unable to drag it to the designer surface.

The designer surface represents only stored procedures/functions which return result set.
Shalex
Devart Team
 
Posts: 7527
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle