Starts in:
2 DAYS
3 HRS
53 MIN
57 SEC
Starts in:
2 D
3 H
53 M
57 S
Open Closed

Create multiple tenants and seed data to each of them #6831


User avatar
0
carl.hallqvist created
  • ABP Framework version: v7.3.3
  • UI Type: Blazor WASM
  • Database System: EF Core SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi,

Is there any document or guide that explain how to create tenants (e.g., tenant-A and tenant-B), and then create admin users, and then seed data for them?

We are using the micro service solution.

Kind regards, Carl


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    No such document, They are already configured by default.

    You can create a tenant on the Saas/Tenans page.

    Then, a tenant creation event will be published. Each microservice subscribes to this creation, creates the database, and initializes the seed data.

  • User Avatar
    0
    carl.hallqvist created

    Thanks! How can I get the name of the created tenant, so I can seed the database with different kind of data? For example, if I name the tenant "Tenant A" then I would like to seed specific data. And same for "Tenant B". We will use this for create demo tenants only, but don't want to do it manually each time we deploy the application.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can get TenantName from the TenantCreatedEto.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06