Oracle - Entity Framework - Stored Procedures - Cursors

0

Any ideas to solve the following: Current Scenario.

I have stored procedures in Oracle which return the result of a Select in a cursor. This procedure is mapped with EF, which automatically generates a complex class based on the cursor columns returned from the SP For each mapped SP, in the web.config , a giant definition is added like this:

    <storedProcedure schema="CLI_WEB" name="PCK_APP_OBJ_MOVIMIENTO.P_OBJ_MOVIMIENTO_A">
      <refCursor name="O_RESULTADO">
        <bindInfo mode="Output" />
        <metadata columnOrdinal="0" columnName="ID_TABLE" providerType="Decimal" allowDBNull="true" nativeDataType="Number" />
        <metadata columnOrdinal="1" columnName="MENSAJE" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
        <metadata columnOrdinal="2" columnName="MENSAJE_EX" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
        <metadata columnOrdinal="3" columnName="EXITO" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
      </refCursor>
    </storedProcedure>

As you can see it is a line for each column of the cursor and I have SP that return a cursor with 20 columns or more, logically this does not seem good, basically for two reasons:

  • The web config would grow in the order of thousands of lines of code, which I do not see maintainable.

  • If an update is made, by simply modifying a column of the SP cursor I would have to distribute everything including the web config (I prefer to avoid distributing the web.config )

Now, what I need is the following: Basically see how all those lines of code that are added to web.config for each stored procedure, stop being in the web config , see how to put them in embedded code or some other way, the important thing is that they no longer appear in web.config .

Note. It is very important, because of the architecture I have, to keep working with stored procedures; I can not change that way of working, only access to stored procedures that return a cursor.

Thank you in advance.

    
asked by RSillerico 18.11.2016 в 15:15
source

0 answers