简体   繁体   中英

Read database schema using NHibernate in c#

I want to give user a choice to select database in our application where number of options will be available like sqlserver,MySql,Sqlite etc.When user selects the type of database,we will show window which will ask user to input the parameters required for DB connection.This will let us connect to user's DB.But Now we want to show all tables and columns from each table to user to select particular tables and columns from it.Is it possible to implement this behavior using NHibernate?Or do I need to use ADO.NET for it? I have searched web to check if it is possible using NHibernate but I just got one answer here.. Using nHibernate to retrieve Database Schema I am not able to understand if this answer will solve my problem.

Thanks in advance

Many database servers implement a schema called INFORMATION. This is part of the ANSI Standard for RDBMSs. It contains data about the schema, tables, and views in the database. I don't know how consistent the INFORMATION structures are across different implementations (eg MS SQL, MySQL, etc), or how many of them actually implement it, but that would be the place to start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM