Hi, I am working on an asp.net business application and using nhibernate. My objective of using nhibernate is to minimize/avoid application porting effort on different databases(Oracle, SQL Server, Postgres etc).
I have a scenario where i have to dynamically check the database table schema and build some functionality on it. First thing comes to my mind is that to create stored procedures and port it on different databases. My stored procedure looks like this...
SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = (
SELECT MasterTableName FROM SystemDocument WHERE DocId = @vDocumentID
)
Now i have 2 questions here...
1- Is there any alternate in NHibernate to achieve this by avoiding stored procedures?
2- If answer of the first question is NO :( then how can i fill a dto/POCO that can contain the columns and their types of the table without mapping it with nhibernate?
I shall be very thankful for your suggestions on this.
Thanks, Asif