Activities of "ahmed.codeator"

abp module TenantAppService in Volo.Abp.TenantManagement

this doesn't solve it

Question

[Authorize(TenantManagementPermissions.Tenants.Create)] public virtual async Task<TenantDto> CreateAsync(TenantCreateDto input) { var tenant = await TenantManager.CreateAsync(input.Name); input.MapExtraPropertiesTo(tenant);

await TenantRepository.InsertAsync(tenant);

await CurrentUnitOfWork.SaveChangesAsync();

await DistributedEventBus.PublishAsync(
    new TenantCreatedEto
    {
        Id = tenant.Id,
        Name = tenant.Name,
        Properties =
        {
                { "AdminEmail", input.AdminEmailAddress },
                { "AdminPassword", input.AdminPassword }
        }
    });

using (CurrentTenant.Change(tenant.Id, tenant.Name))
{
    //TODO: Handle database creation?
    // TODO: Seeder might be triggered via event handler.
    await DataSeeder.SeedAsync(
                    new DataSeedContext(tenant.Id)
                        .WithProperty("AdminEmail", input.AdminEmailAddress)
                        .WithProperty("AdminPassword", input.AdminPassword)
                    );
}

return ObjectMapper.Map&lt;Tenant, TenantDto&gt;(tenant);

}

this is seeding twice one explicitly and one in event hander and this is creating all kind of issues for the second one alot of errors are reported and the tenant creation become too slow the data is seeded but the second one is unnecessary and making things very slow how can we solve that

Showing 1 to 3 of 3 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.3.0-preview. Updated on March 13, 2026, 12:51
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.