Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是企业库框架的新手。有没有办法在企业库中获取类似于 sqlConnection.GetSchema() 方法的数据库模式。
任何帮助将不胜感激。
谢谢,诗诗
我认为块中没有此功能的任何包装器。您可以通过从数据库中获取 DbConnection 来使用 DbConnection.GetSchema() 方法:
Database db = DatabaseFactory.CreateDatabase(); DbConnection conn = db.CreateConnection(); DataTable dt = conn.GetSchema();