Reputation: 2882
I want to use Pivot with a named query with nhibernate 3.3 and use it in a GridView.
I saw on NHibernate, Pivot-table and/or GetNextID() that I can use result transformer but I can't predict what will be the fields. (So a bean isn't possible I think, and I need to have named column)
So the best solution is to use a named query and put it in a DataTable.
Is there a easy way to get the data and put it in a DataTable. A method would be to retrieve the SqlConnection from nhibernate and use it to retrieve the data returned by the stored procedure. But does someone how to do that ?
Regards
Upvotes: 2
Views: 1325
Reputation: 30813
NHibernates ISession interface has property Connection
which gives the underlying ADO.NET connction object.
Upvotes: 5