Using Fluent Nhibernate with Oracle stored procedure

Skip to first unread message

satish viswanath

Nov 21, 2019, 11:38:51 AM11/21/19
to Fluent NHibernate

I'm trying to integrate Oracle stored procedure which returns a ref cursor and map to my model.

Below is the sample code that I'm using.

public class TasksMap : ClassMap<Tasks>
        public TasksMap()
            StoredProcedure("My_Proc", "");
            Id(x => x.Id);
            Map(x => x.TaskType);
            Map(x => x.CustId);
            Map(x => x.CreateDate);


return await _session.GetNamedQuery("My_Proc ")
                                 .SetParameter("in_custid", custId)

I'm using a ref cursor in the oracle procedure to return the records. Can someone share a sample working code?

Reply all
Reply to author
0 new messages