NHibernate Forge
The official new home for the NHibernate for .NET community

User provided ADO.NET connection

Article
Comments (0)
History (7)
100% of people found this useful

User provided ADO.NET connection

An ISessionFactory may open an ISession a user-provided ADO.NET connection. This design choice frees the application to obtain ADO.NET connections wherever it pleases:

IDbConnection conn = myApp.GetOpenConnection(); ISession session = sessions.OpenSession(conn);

// do some data access work

The application must be careful not to open two concurrent ISession on the same ADO.NET connection!

Recent Comments

Leave the first comment for this page.
View All
Powered by Community Server (Commercial Edition), by Telligent Systems