public bool IsReachedMaximumUsersCount(string tenantId, int featureMaximumAllowedUsers) { if (featureMaximumAllowedUsers == 0) { return(false); } var users = GetTenantUsersByTenantId(tenantId); var tenant = _tenantProvider.GetAll().AsNoTracking().FirstOrDefault(x => x.Id == tenantId); //var showroom = tenant?.NoOfShowroom ?? 0; var bonusUser = tenant?.BonusUserAccessCount ?? 0; //return users.Count >= (featureMaximumAllowedUsers * showroom) + bonusUser; return(users.Count >= (featureMaximumAllowedUsers) + bonusUser); }