0 Comments

When using NHibernate with an Oracle db, executing a stored procedure is simple. But it has a twist. Instead of using the keyword “exec”, you must use “call”.

<span id="lnum1" style="color: #606060">   1:</span> var query = session.CreateSQLQuery(<span style="color: #006080">"call MY_PROCEDURE ('Param1', 'Param2')"</span>);

<span id="lnum2" style="color: #606060">   2:</span> query.ExecuteUpdate();