I have an sql-query define on my nhibernate mapping file, that call an stored procedure to select some records.
<sql-query name="sp_MYSP">
exec MYDBSP :param1, :param2, :param3
</sql-query>
On code, I call the named query in this way:
IQuery myQuery= Session.GetNamedQuery("sp_MYSP");
myQuery.SetString("param1", p1);
myQuery.SetString("param2", p2);
myQuery.SetString("param3", p3);
to get results I use "List" method
myQuery.List();
but in this way it return a list of objects without any meta information...like columname. I would read result like a datatable to get value of specific property...how can I do?
The selected records don't represents any entity of my domain modal, but only a collection of data use for a specific process.