2024-02-08 17:32:28 +08:00
|
|
|
|
using Volo.Abp.MultiTenancy;
|
2024-01-21 18:11:04 +08:00
|
|
|
|
using Yi.Framework.SqlSugarCore.Abstractions;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.TenantManagement.Domain
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class TenantManagementExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
public static IDisposable ChangeMaster(this ICurrentTenant currentTenant)
|
|
|
|
|
|
{
|
2024-02-08 17:32:28 +08:00
|
|
|
|
return currentTenant.Change(null, DbConnOptions.MasterTenantName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static IDisposable ChangeDefalut(this ICurrentTenant currentTenant)
|
|
|
|
|
|
{
|
|
|
|
|
|
return currentTenant.Change(null, DbConnOptions.DefaultTenantName);
|
2024-01-21 18:11:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|