Thank you for your response,
I added the TenantDatabaseMigrationHandler class to my host project. When I add a tenant from the tenantsManagement screen, the HandleEventAsync function is called. However, when I use tenantAppService.CreateAsync(newTenant) in another module, that function isnt called.
What could be the solution to this issue?
I migrated my solution to commercial project. like the guide here Using tenantAppService.CreateAsync(newTenant) creates a new tenant, but admin user doesnt added. Surprisingly, this problem doesnt occur in the host project, only in other modules within the solution. What could be causing this problem ?