如何将应用程序设置加载到 NHibernate.Cfg.Configuration 对象?
如何使用 App.config 中的 System.Configuration.ConfigurationManager 将应用程序设置加载到 NHibernate.Cfg.Configuration 对象?
How to load application settings to NHibernate.Cfg.Configuration
object by using System.Configuration.ConfigurationManager
from App.config?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
hibernate配置也可以移到app.config中,这简化了启动代码。请参阅 NHibernate 参考手册中的 XML 配置文件 部分。
在 app.config 中:
The hibernate configuration can also be moved into app.config, which simplifies the startup code. See section XML Configuration File in the NHibernate reference manual.
And in app.config:
应用程序配置:
C# 代码:
app.config:
C# code: