/// <summary> /// Get the current tenant /// </summary> /// <returns></returns> public async Task <Tenant?> GetTenantAsync() { var tenantIdentifier = await _tenantResolutionStrategy.GetTenantIdentifierAsync(); if (string.IsNullOrWhiteSpace(tenantIdentifier)) { return(null); } return(await _tenantStore.GetTenantAsync(tenantIdentifier)); }
public async Task <TenantConfig> GetTenantFromHostAsync() { var tenantIdentifier = await _tenantResolutionStrategy.GetTenantIdentifierAsync(); if (tenantIdentifier == _appSettings.BaseHost) { return(new TenantConfig() { Name = _appSettings.BaseHost }); } return(await _multiTenantContext.TenantConfigs.FirstOrDefaultAsync(x => x.Name == tenantIdentifier)); }
public async Task <T> GetTenantAsync() { var tenantIdentifier = await _tenantResolutionStrategy.GetTenantIdentifierAsync(); return(await _tenantStore.GetTenantAsync(tenantIdentifier)); }
public async Task <Tenant> GetTenantAsync() { string tenantIdentifier = await _tenantResolutionStrategy.GetTenantIdentifierAsync(); return(await _tenantStore.GetTenantAsync(tenantIdentifier.ToLowerInvariant())); }
/// <summary> /// Get the current tenant /// </summary> /// <returns></returns> public async Task <T> GetTenantAsync() { var(domainName, ipAddress, name) = await _tenantResolutionStrategy.GetTenantIdentifierAsync(); return(await _tenantStore.GetTenantAsync(domainName, ipAddress, name)); }