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

            EricABPDbContextConfigurer.Configure(builder, configuration.GetConnectionString(EricABPConsts.ConnectionStringName));

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