using NPin.Framework.SqlSugarCore.Abstractions;
using Volo.Abp.MultiTenancy;

namespace NPin.Framework.TenantManagement.Domain;

public static class TenantManagementExtensions
{
    public static IDisposable ChangeMaster(this ICurrentTenant currentTenant)
    {
        return currentTenant.Change(null, DbConnOptions.MasterTenantName);
    }

    public static IDisposable ChangeDefault(this ICurrentTenant currentTenant)
    {
        return currentTenant.Change(null, DbConnOptions.DefaultTenantName);
    }
}