forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIConnectionAccess.cs
32 lines (29 loc) · 927 Bytes
/
IConnectionAccess.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Data.Common;
namespace NHibernate.Connection
{
//JdbcConnectionAccess.java in hibernate
/// <summary>
/// Provides centralized access to connections. Centralized to hide the complexity of accounting for contextual
/// (multi-tenant) versus non-contextual access.
/// Implementation must be serializable
/// </summary>
public partial interface IConnectionAccess
{
/// <summary>
/// The connection string of the database connection.
/// </summary>
string ConnectionString { get; }
//ObtainConnection in hibernate
/// <summary>
/// Gets the database connection.
/// </summary>
/// <returns>The database connection.</returns>
DbConnection GetConnection();
//ReleaseConnection in hibernate
/// <summary>
/// Closes the given database connection.
/// </summary>
/// <param name="connection">The connection to close.</param>
void CloseConnection(DbConnection connection);
}
}