Working with the ABP multi-tenancy infrastructure
In this section, we will explore the basic infrastructure and features of the ABP multi-tenancy system. You will learn how ABP understands the current tenant and isolates the tenant data, how you can get information about the current tenant, and how to switch between tenants. But first, we will start with how you can disable multi-tenancy if you don't need it.
Enabling and disabling multi-tenancy
The ABP startup solution template comes with multi-tenancy enabled by default. The startup solution has a single point that you can use to easily enable or disable multi-tenancy. Find the MultiTenancyConsts
class inside the .Domain.Shared
project:
public static class MultiTenancyConsts { public const bool IsEnabled = true; }
You can set the IsEnabled
value to false
to disable multi-tenancy. This constant is used in a few places in the solution. It is used to set the AbpMultiTenancyOptions.IsEnabled
option...