product version .NET Core and Angular 9.2.1
- Angular
- .net core)
I have a Query regarding tenant database creation on Azure elastic pools :
In current template 8.9 , When we create a new tenant with separate database option, its DB get created using following method
_abpZeroDbMigrator.CreateOrMigrateForTenant(tenant);
As this method is present in library , I am unable to modify this method. I want to change the DB creation logic so that DB gets created on Azure elastic pool
Can you please guide me how to extend existing template method to achieve this functionality ?
Thanks you
2 Answer(s)
-
0
Hi,
This class is defined in the framework, see https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.ZeroCore.EntityFrameworkCore/Zero/EntityFrameworkCore/AbpZeroDbMigrator.cs. You can create your own implementation of
IAbpZeroDbMigrator
and replace it in your app using something like below in the PreInitialize method of your module class;Configuration.ReplaceService<IAbpZeroDbMigrator, MyAbpZeroDbMigrator>(DependencyLifeStyle.Transient);
-
0
Hello Omkar,
Were you able to successfully implement this? We are considering this for one of our future projects and wondering if you ran into issues using Elastic pools. Any insight is appreciated.
Thanks, Raj.