I'm using NHibernate on my project and have implemented auditing functionality using event listeners.
I now need to get this data back, I want to return it exactly as it is in the database I dont need a rich object model with relationships all I want is the IDs of any relationships.
I am basically just trying to show an audit log (which is essentially a copy of what you would see if you opened the table up in sql).
I need to be able to do this for many tables though and all I have is the audit table name, is there a generic way to get NHibernate to query a table and just return the results as a datatable or something simple like that that doesn't have a defined model?
So essentially I want NHibernate to do this:
SELECT * FROM "tablename"
and then return it in some generic way that I can put in a grid and have it autogenerate the columns off it.