EF Core with Oracle using DB First

118 Views Asked by At

I have an existing App with its most of the logic written in Oracle DB SProc using ref cursors and I choose EF with its mapping over classic ADO.NET with something like Automapper. First I want to know if that's the best practice in this case or not second I got stuck in a point where ref cursors don't return any result if there's no result to the query which makes the mapping throws mapping exception so how to check on that ?

Here's how I define the ref cursor

prmRefCursor.ParameterName = "refCursorParam";
prmRefCursor.OracleDbType = OracleDbType.RefCursor;
prmRefCursor.Direction = ParameterDirection.Output;
sprocParamsList.Add(prmRefCursor);

And then I call the the Procedure

_dbContext.orders.FromSqlRaw
0

There are 0 best solutions below