Document_Manager #129
@ -13,6 +13,7 @@ namespace Marco.Pms.Services.Helpers
|
|||||||
private readonly ApplicationDbContext _context; // Keeping this for direct scoped context use where appropriate
|
private readonly ApplicationDbContext _context; // Keeping this for direct scoped context use where appropriate
|
||||||
private readonly ILoggingService _logger;
|
private readonly ILoggingService _logger;
|
||||||
private readonly FeatureDetailsHelper _featureDetailsHelper;
|
private readonly FeatureDetailsHelper _featureDetailsHelper;
|
||||||
|
private static readonly Guid SuperTenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
||||||
public GeneralHelper(IDbContextFactory<ApplicationDbContext> dbContextFactory,
|
public GeneralHelper(IDbContextFactory<ApplicationDbContext> dbContextFactory,
|
||||||
ApplicationDbContext context,
|
ApplicationDbContext context,
|
||||||
ILoggingService logger,
|
ILoggingService logger,
|
||||||
@ -307,6 +308,10 @@ namespace Marco.Pms.Services.Helpers
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (tenantId == SuperTenantId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// Run both queries concurrently
|
// Run both queries concurrently
|
||||||
var totalSeatsTask = GetMaxSeatsAsync(tenantId);
|
var totalSeatsTask = GetMaxSeatsAsync(tenantId);
|
||||||
var totalSeatsTakenTask = GetActiveEmployeesCountAsync(tenantId);
|
var totalSeatsTakenTask = GetActiveEmployeesCountAsync(tenantId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user