Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

EfCore 3.1+ - support for retrieving refcursor from OUT parameter of a procedure for a value object

Mike R.Apr 27 2021 — edited Apr 27 2021

the RefCursor returned is for a DTO, that is not an entity set in the DbContext.

context.Database.ExecuteSqlRaw(sql, parms)

Is this a supported scenario?
Are there any examples?
Are there specific settings to keep connection open to allow to retrieve the ref cursor?
In ASP.NET Core app, with Microsoft Dependency Injection, it seems I get the value of the OUT Parameter, but when executing GetDataReader() , exception is thrown:
System.InvalidOperationException: 'Invalid operation on a closed object'

Comments
Post Details
Added on Apr 27 2021
5 comments
1,145 views