none
Call Oracle Package function doing DML using Entity framework RRS feed

  • Question

  • Hi,

    I am using Asp.Net MVC, Entity framework using Oracle.

    I have one user defined function within Oracle package. This user defined function takes some input parameters and outputs some rows. It also does data manipulations i.e. updates some rows, deletes and inserts some rows.

    Now I am not sure how to call this function.

    When I try to call it with select syntax like below-
    SELECT value DataModel.Store.PKGNAME_FUNCTION_NAME(@INPUTPARAM1) FROM {1}

    it throws valid error like - Unexpected error encountered in PKGNAME.FUNCTION_NAME: ORA-14551: cannot perform a DML operation inside a query

    Please suggest on how to call such user defined function of oracle using EF in .Net.

    FYI: I have added function in edmx from "update model from database" and then included package>function from there. I do not imported function because no function was listed on import function popup.

    Thanks.

    Monday, August 13, 2012 1:03 PM

Answers