Open a ISession on the given connection
Namespace: NHibernateAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
ISession OpenSession( IDbConnection conn ) |
Visual Basic |
---|
Function OpenSession ( _ conn As IDbConnection _ ) As ISession |
Visual C++ |
---|
ISession^ OpenSession( IDbConnection^ conn ) |
Parameters
- conn
- Type: System.Data..::..IDbConnection
A connection provided by the application
Return Value
A sessionRemarks
Note that the second-level cache will be disabled if you
supply a ADO.NET connection. NHibernate will not be able to track
any statements you might have executed in the same transaction.
Consider implementing your own IConnectionProvider.