I am using Entity framework with following tools:
MS Visual studio 2010 Professional SP1
Latest Oracle data provider from Oracle website. (ODAC 11.2 Release 4 (11.2.0.3.0) for 32 bit) Downloaded it from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
Oracle 11g server
My table looks as follows
my stored proc looks as follows:
PROCEDURE "GET_SUPPLIERS" (
"SUPP_LIST" OUT SYS_REFCURSOR) IS
BEGIN
OPEN SUPP_LIST FOR
SELECT
SUPPLIER_NAME
FROM
A_SUPPLIER ;
END;
I updated app.config for my entity framework project as follows:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Entities" connectionString="tookitoutfromhere" />
</connectionStrings>
<oracle.dataaccess.client>
<settings>
<add name="FSDEVTL.GET_SUPPLIERS.RefCursor.SUPP_LIST" value="implicitRefCursor bindinfo='mode=Output'" />
<add name="FSDEVTL.GET_SUPPLIERS.RefCursorMetaData.SUPPLIER_NAME.Column.0" value="implicitRefCursor metadata='ColumnName=SUPPLIER_NAME;BaseColumnName=SUPPLIER_NAME;BaseSchemaName=FSDEVTL;BaseTableName=A_SUPPLIER;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
</settings>
</oracle.dataaccess.client>
</configuration>
I execute the following steps:
Under my .edmx project -> Model.Store -> Stored Procedures -> GET_SUPPLIERS
right click the stored procedure "GET_SUPPLIERS" choose "add function import" Function Import name and Stored procedure name are pre populated Under Returns a collection of I choose Entities as a_supplier which is the imported Oracle table. Then I click on "Get column information" button.
I get a response called "The selected stored procedure retuns no columns."
Please help.
I would like to be able to get recordset from stored procedure into my .net classes via entity framework.
Thanks
Please choose complex in "returns a collection of" and try again.
Example in "Function Imports and Retrieving Implicit Resultsets | Inserting and Updating Data Directly"
http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm#t9