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

            InfomationSystemDbContextConfigurer.Configure(builder, configuration.GetConnectionString(InfomationSystemConsts.ConnectionStringName));

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