Open Closed

Multitenancy resolution #5


0
keirk created

Could someone point me in the right direction - I'm trying to understand how multi tenancy is resolved in module zero, and how I could implement custom resolution (using something other than subdomain).

Thanks


1 Answer(s)
  • 0
    hikalkan created

    Hi,

    If you are using multi-tenancy, first you should enable it. Then you can use UserManager's LoginAsync method to login. After login, you can use IAbpSession.TenantId to get current tenant's id. If you are not in host mode (when you don't provide tenancy name, you will be logged in as host) then TenantId will be null.

    To resolve tenancy name, you can use any method including subdomain. Even a simple login form with tenancy name, user name and password. See https://github.com/aspnetboilerplate/mo ... troller.cs for a sample of login operation.

    I'm actively working on mutli-tenancy implementation. So, thing may change. I will document in detail when it will be stable.