0
barrett2474 created
- ABP Framework version: v5.22
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
The global admin of our site needs to add new records in a table for all our Tenants.. Its kind of a bulk process we have.
Can the global Admin make inserts/updates "in the context" of a Tenant?
Thank you!
John
2 Answer(s)
-
1
Hi,
See: https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant
You can change the current tenant.
For example:
var tenants = await TenantRepository.GetListAsync(); foreach(var tenant in tenants) { using(CurrentTenant.Change(tenant.Id)) { //inserts/updates for a tenant here.. } }
-
0
that's great - thanks for the fast response!