Retrieve value of an output parameter and assign it to a List<Model> using Entity Framework Core

38 Views Asked by At

I am invoking a stored procedure which updates the table in Oracle DB and then using an output parameter of SystemRefCursor, I am running the select query for it.

I am using the ExecuteRawSql extension method in Entity Framework Core to invoke the stored procedure which updates the DB and also fetches the value for the SystemRefCursor output parameter.

How to retrieve the value from the SystemRefCursor and assign it to a List<Model>?

Example :

I have a stored procedure ProcessEmployeeRecords which updates the Employee table where DeptId = 1 and also returns the rows from the Employee table where DeptId = 1 as an output parameter, namely employeeCursor of SystemRefCursor type.

How to retrieve the value from employeeCursor and assign it to a List<Employee> named employeeList ?

Any help would be much appreciated.

I am not familiar with retrieving value from an output parameter of SystemRefCursor type and assigning it to a List<Model>

0

There are 0 best solutions below