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

            PropertyPublicityDbContextConfigurer.Configure(builder, configuration.GetConnectionString(PropertyPublicityConsts.ConnectionStringName));

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