mirror of https://github.com/abpframework/abp.git
20 changed files with 83 additions and 45 deletions
@ -1,15 +1,17 @@ |
|||||
using System.Collections.Generic; |
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
namespace Volo.Abp.Data |
namespace Volo.Abp.Data |
||||
{ |
{ |
||||
|
[Serializable] |
||||
public class ConnectionStrings : Dictionary<string, string> |
public class ConnectionStrings : Dictionary<string, string> |
||||
{ |
{ |
||||
public const string DefaultConnectionStringName = "Default"; |
public const string DefaultConnectionStringName = "Default"; |
||||
|
|
||||
public string Default |
public string Default |
||||
{ |
{ |
||||
get { return this.GetOrDefault(DefaultConnectionStringName); } |
get => this.GetOrDefault(DefaultConnectionStringName); |
||||
set { this[DefaultConnectionStringName] = value; } |
set => this[DefaultConnectionStringName] = value; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
namespace Volo.Abp.MultiTenancy.ConfigurationStore |
||||
|
{ |
||||
|
public class ConfigurationTenantStoreOptions |
||||
|
{ |
||||
|
public TenantInfo[] Tenants { get; set; } |
||||
|
|
||||
|
public ConfigurationTenantStoreOptions() |
||||
|
{ |
||||
|
Tenants = new TenantInfo[0]; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
using System; |
||||
|
using JetBrains.Annotations; |
||||
|
using Volo.Abp.Data; |
||||
|
|
||||
|
namespace Volo.Abp.MultiTenancy |
||||
|
{ |
||||
|
[Serializable] |
||||
|
public class TenantInfo |
||||
|
{ |
||||
|
public Guid Id { get; } |
||||
|
|
||||
|
public string Name { get; } |
||||
|
|
||||
|
public ConnectionStrings ConnectionStrings { get; } |
||||
|
|
||||
|
private TenantInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public TenantInfo(Guid id, [NotNull] string name) |
||||
|
{ |
||||
|
Check.NotNull(name, nameof(name)); |
||||
|
|
||||
|
Id = id; |
||||
|
Name = name; |
||||
|
|
||||
|
ConnectionStrings = new ConnectionStrings(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,12 +0,0 @@ |
|||||
namespace Volo.Abp.MultiTenancy |
|
||||
{ |
|
||||
public class ConfigurationTenantStoreOptions |
|
||||
{ |
|
||||
public Tenant[] Tenants { get; set; } |
|
||||
|
|
||||
public ConfigurationTenantStoreOptions() |
|
||||
{ |
|
||||
Tenants = new Tenant[0]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue