public ABP_CORE_MPADbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <ABP_CORE_MPADbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());

            ABP_CORE_MPADbContextConfigurer.Configure(builder, configuration.GetConnectionString(ABP_CORE_MPAConsts.ConnectionStringName));

            return(new ABP_CORE_MPADbContext(builder.Options));
        }
 public override void PreInitialize()
 {
     if (!SkipDbContextRegistration)
     {
         Configuration.Modules.AbpEfCore().AddDbContext <ABP_CORE_MPADbContext>(options =>
         {
             if (options.ExistingConnection != null)
             {
                 ABP_CORE_MPADbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection);
             }
             else
             {
                 ABP_CORE_MPADbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString);
             }
         });
     }
 }