Base solution for your next web application
Open Closed

Doubts | Single Tenancy vs Multi Tenancy | #5667


User avatar
0
mgarcia created

Hi! while Im been working on aspnetzero some doubs came to my mind around Tenancy.

The target of my development is going to be a Multi Tenancy Solution, so Im thinking what would be the use of the "Default" Tenant that is created the first time I run the solution.

My main doubt is for the super admin users that work mainteining all the platform, they should have tenant null? or do they need to be linked to "Default" tenant?

I've been using default tenant with a single user, just to test funcionalities between Users admin (with tenantid null) and users with tenantId, checking that all methods works fine, etc. Just want to be sure that default tenant is not a must I should use when my app is online on production.

Base on Boilerplate documentation:

"Default Tenant ASP.NET Boilerplate and Module Zero assume that there is a pre-defined tenant where the TenancyName is 'Default' and the Id is 1. In a single-tenant application, this is used as the only tenant. In a multi-tenant application, you can delete it or make it passive."

"In a single-tenant application, this is used as the only tenant"

So if this was a SingleTenant app, all my users should be link it to it? but if it is multi-tenancy app, "default" tenant is not required to me? I can have users with tenant null and everything is going to work as expected?

thx so much.


1 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team

    You don't need to care about tenant-related things when you disable multi-tenancy(Users can set the tenant id). In the case of multi-tenancy: the default tenant can be removed or modified.

    Please refer to the tenant and host documentation Multi-Tenancy#host-vs-tenant