How can I access the value of an out parameter of an oracle stored procedure in the .net code - Oracle stored procedure being called via Nhibernate?
Sample working code would help.
You have to use the latest version of NHibernate (2.1.2).
<sql-query name="ReturnSomethig" callable="true">
<return class="Somethig" />
{ call ReturnSomethig(:someParameter) }
</sql-query>
The Oracle Stored Procedure need to has the first parameter as a out sys_refcursor parameter.
And you can call the named query like that:
IQuery query = currentSession.GetNamedQuery("ReturnSomethig");
query.SetInt64("someParameter", someParameter);
var somethig = query.List<Somethig>();
And it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With