I am using Entity Framework with Oracle in a project and trying to call a stored procedure from EF. The procedure goes as
Create or Replace Procedure usp_RotaPlateProductie_Select(
p_afdelingId in varchar2,
p_productTypeId in varchar2,
p_productieData out sys_refcursor)
IS
Begin
Open p_productieData for
Select rp.Batchnummer, cppo.Productnummer, p.Omschrijving, pra.Bruto_In_Meters
From Rotaplateproductie rp inner join Productieresultaatrtplrol pra
on rp.Batchnummer = pra.Batchnummer inner join Cpiplusproductieorder cppo
on pra.ProductieNummer = cppo.ProductNummer inner join Product p
on cppo.Productnummer = p.Productnummer Where rp.Afdelingid = p_afdelingId
and rp.producttype = p_productTypeId;
END;
But when EF executes the function I am getting the error below
ORA-06550: line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'USP_ROTAPLATEPRODUCTIE_SELECT.
ORA-06550: line 1, column 8:
PL / SQL: Statement IGNORED.
I am calling this procedure using the below code
public ObjectResult<RotaPlateProductie> Search_RotaPlateProductie(global::System.String p_AFDELINGID, global::System.String p_PRODUCTTYPEID)
{
ObjectParameter p_AFDELINGIDParameter;
if (p_AFDELINGID != null)
{
p_AFDELINGIDParameter = new ObjectParameter("P_AFDELINGID", p_AFDELINGID);
}
else
{
p_AFDELINGIDParameter = new ObjectParameter("P_AFDELINGID", typeof(global::System.String));
}
ObjectParameter p_PRODUCTTYPEIDParameter;
if (p_PRODUCTTYPEID != null)
{
p_PRODUCTTYPEIDParameter = new ObjectParameter("P_PRODUCTTYPEID", p_PRODUCTTYPEID);
}
else
{
p_PRODUCTTYPEIDParameter = new ObjectParameter("P_PRODUCTTYPEID", typeof(global::System.String));
}
return base.ExecuteFunction<RotaPlateProductie>("Search_RotaPlateProductie", p_AFDELINGIDParameter, p_PRODUCTTYPEIDParameter);
}
Here RotaPlateProductie is the entity from which I am binding the result set Please help.