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

            TravelmaticsDbContextConfigurer.Configure(builder, configuration.GetConnectionString(TravelmaticsConsts.ConnectionStringName));

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