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

            CMS_BoilerplateDbContextConfigurer.Configure(builder, configuration.GetConnectionString(CMS_BoilerplateConsts.ConnectionStringName));

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