开发者

How do I get the connection string associated with an nHibernate GenericADOException for logging purposes?

I need to log the se开发者_开发知识库rver name from the connection string that was in use when the nHibernate GenericADOException was thrown.

Anyone know how to do this? I've looked high and low on the web and haven't found anything that looks promising.


Grab the ISession.

ISession session = SessionFactory.OpenSession();
string connectionString = session.Connection.ConnectionString;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜