Entity framework cannot "add function import" for Oracle stored procedure
I am using Entity framework with the 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 from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
-
Oracle Server 11g
My table looks like this
my stored procedure looks like this:
PROCEDURE "GET_SUPPLIERS" (
"SUPP_LIST" OUT SYS_REFCURSOR) IS
BEGIN
OPEN SUPP_LIST FOR
SELECT
SUPPLIER_NAME
FROM
A_SUPPLIER ;
END;
I updated the app.config for my entity infrastructure 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 follow these steps:
In my .edmx project -> Model.Store -> Stored Procedures -> GET_SUPPLIERS
right click the stored procedure "GET_SUPPLIERS" select "add import function" The function name and stored procedure name are prepopulated In the Returns collection section I select Entities as a_supplier which is an imported Oracle table. Then I click the Get Column Information button.
I am getting a response titled "The selected stored procedure does not drop columns".
Please, help.
I would like to be able to get a set of records from a stored procedure into my .net classes via entity framework.
thank
source to share
Select complex in "Returns collection" and try again.
Example in "Importing functions and getting implicit results" Inserting and updating data directly "
http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm#t9
source to share