diff --git a/src/Riven.Domain/MultiTenancy/MultiTenancyConfig.cs b/src/Riven.Domain/MultiTenancy/MultiTenancyConfig.cs index b65931d..a11b015 100644 --- a/src/Riven.Domain/MultiTenancy/MultiTenancyConfig.cs +++ b/src/Riven.Domain/MultiTenancy/MultiTenancyConfig.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; @@ -9,12 +9,10 @@ namespace Riven.MultiTenancy /// public static class MultiTenancyConfig { - /// - /// 默认存储租户名称键值 - /// - public const string DEFAULT_TENANT_NAME_KEY = "TenantName"; - private static bool? _isEnabled = null; + #region 是否启用 + + static bool? _isEnabled = null; /// /// 是否启用多租户,默认值为false,只有第一次设置值会生效 @@ -41,7 +39,17 @@ public static bool IsEnabled } } - private static string _tenantNameKey = DEFAULT_TENANT_NAME_KEY; + #endregion + + + #region 多租户键值 + + /// + /// 默认存储租户名称键值 + /// + const string DEFAULT_TENANT_NAME_KEY = "tenantname"; + + static string _tenantNameKey = DEFAULT_TENANT_NAME_KEY; /// /// 存储租户名称键值 ,默认值为 , 值不能为空, 第一次设置值会生效 @@ -58,9 +66,11 @@ public static string TenantNameKey if (_tenantNameKey == DEFAULT_TENANT_NAME_KEY) { - _tenantNameKey = value; + _tenantNameKey = value.ToLower(); } } - } + } + + #endregion } }