File tree 5 files changed +29
-0
lines changed 5 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ namespace NHibernate.Connection
6
6
/// <summary>
7
7
/// Provides centralized access to connections. Centralized to hide the complexity of accounting for contextual
8
8
/// (multi-tenant) versus non-contextual access.
9
+ /// Implementation must be serializable
9
10
/// </summary>
10
11
public partial interface IConnectionAccess
11
12
{
Original file line number Diff line number Diff line change @@ -12,9 +12,15 @@ namespace NHibernate.MultiTenancy
12
12
[ Serializable ]
13
13
public abstract partial class AbstractMultiTenantConnectionProvider : IMultiTenantConnectionProvider
14
14
{
15
+ /// <summary>
16
+ /// Tenant connection string
17
+ /// </summary>
15
18
protected abstract string TenantConnectionString { get ; }
19
+
20
+ /// <inheritdoc />
16
21
public abstract string TenantIdentifier { get ; }
17
22
23
+ /// <inheritdoc />
18
24
public IConnectionAccess GetConnectionAccess ( )
19
25
{
20
26
//TODO 6.0: Remove check
Original file line number Diff line number Diff line change @@ -8,8 +8,15 @@ namespace NHibernate.MultiTenancy
8
8
/// </summary>
9
9
public interface IMultiTenantConnectionProvider
10
10
{
11
+ /// <summary>
12
+ /// Tenant identifier must uniquely identify tenant (is used for data separation in cache)
13
+ /// Note: Among other things this value is used for data separation between tenants in cache so not unique value will leak data to other tenants
14
+ /// </summary>
11
15
string TenantIdentifier { get ; }
12
16
17
+ /// <summary>
18
+ /// Tenant connection access
19
+ /// </summary>
13
20
IConnectionAccess GetConnectionAccess ( ) ;
14
21
}
15
22
}
Original file line number Diff line number Diff line change 1
1
namespace NHibernate . MultiTenancy
2
2
{
3
+ /// <summary>
4
+ /// Strategy for multi-tenancy
5
+ /// <seealso cref="NHibernate.Cfg.Environment.MultiTenant"/>
6
+ /// </summary>
3
7
public enum MultiTenancyStrategy
4
8
{
5
9
/// <summary>
Original file line number Diff line number Diff line change @@ -7,9 +7,20 @@ namespace NHibernate.MultiTenancy
7
7
/// </summary>
8
8
public class TenantConfiguration
9
9
{
10
+ /// <summary>
11
+ /// Tenant identifier must uniquely identify tenant
12
+ /// Note: Among other things this value is used for data separation between tenants in cache so not unique value will leak data to other tenants
13
+ /// </summary>
10
14
public string TenantIdentifier { get ; set ; }
15
+
16
+ /// <summary>
17
+ /// Tenant connection access. Required for <seealso cref="MultiTenancyStrategy.Database"/> multi-tenancy strategy.
18
+ /// </summary>
11
19
public IConnectionAccess ConnectionAccess { get ; set ; }
12
20
21
+ /// <summary>
22
+ /// Creates tenant configuration for <seealso cref="MultiTenancyStrategy.Database"/> multi-tenancy strategy.
23
+ /// </summary>
13
24
public TenantConfiguration ( IMultiTenantConnectionProvider tenantConnectionProvider )
14
25
{
15
26
TenantIdentifier = tenantConnectionProvider . TenantIdentifier ;
You can’t perform that action at this time.
0 commit comments