public AbpNiucaiCoreDbContext Create(DbContextFactoryOptions options)
        {
            var builder       = new DbContextOptionsBuilder <AbpNiucaiCoreDbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());

            AbpNiucaiCoreDbContextConfigurer.Configure(builder, configuration.GetConnectionString(AbpNiucaiCoreConsts.ConnectionStringName));

            return(new AbpNiucaiCoreDbContext(builder.Options));
        }
 public override void PreInitialize()
 {
     if (!SkipDbContextRegistration)
     {
         Configuration.Modules.AbpEfCore().AddDbContext <AbpNiucaiCoreDbContext>(configuration =>
         {
             AbpNiucaiCoreDbContextConfigurer.Configure(configuration.DbContextOptions, configuration.ConnectionString);
         });
     }
 }