I use NHibernate in my application very intensively. But sometimes I NEED to get data in form of ADO.NET DataTable. Of course I could write separate data access code, but that would be bad, because NHibernate is the main data access point in my application that incapsulates me from underlying database.
I can have access to IDbConnection through NHibernate's ISession interface. Using this I can create IDbCommand and execute custom SQL statement and get it as DataTable, then it is passed to client. After some client modifications I need to commit changes to database and want to implement this by using IDataAdapter. The problem is that I can't get this - the only thing I have is IDbConnection.
Please suggest me in my problem.
|