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

            AspNetBoilerplateDbContextConfigurer.Configure(builder, configuration.GetConnectionString(AspNetBoilerplateConsts.ConnectionStringName));

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