In a real application, most of times you will want to determine current tenant either by subdomain (like mytenant1.mydomain.com) or by the whole domain (like mytenant.com). If so, you can configure TenantResolveOptions to add a domain tenant resolver.
In a real application, most of times you will want to determine current tenant either by subdomain (like mytenant1.mydomain.com) or by the whole domain (like mytenant.com). If so, you can configure AbpTenantResolveOptions to add a domain tenant resolver.
###### Example: Add a subdomain resolver
###### Example: Add a subdomain resolver
@ -340,7 +340,7 @@ namespace MyCompany.MyProject
{
{
public override void ConfigureServices(ServiceConfigurationContext context)
public override void ConfigureServices(ServiceConfigurationContext context)
{
{
Configure<TenantResolveOptions>(options =>
Configure<AbpTenantResolveOptions>(options =>
{
{
//Subdomain format: {0}.mydomain.com (adding as the highest priority resolver)
//Subdomain format: {0}.mydomain.com (adding as the highest priority resolver)
options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com"));
options.TenantResolvers.Insert(0, new DomainTenantResolver("{0}.mydomain.com"));