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

            NovusDbContextConfigurer.Configure(builder, configuration.GetConnectionString(NovusConsts.ConnectionStringName));

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